mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-28 07:48:37 -04:00
Merge branch 'release/1.10.x'
This commit is contained in:
commit
8afd0e526f
@ -65,7 +65,7 @@ PUBLISHED:
|
||||
~IStreamWrapper();
|
||||
|
||||
INLINE std::istream *get_istream() const;
|
||||
MAKE_PROPERTY(std::istream, get_istream);
|
||||
MAKE_PROPERTY(istream, get_istream);
|
||||
|
||||
public:
|
||||
void read(char *buffer, std::streamsize num_bytes);
|
||||
@ -92,7 +92,7 @@ PUBLISHED:
|
||||
~OStreamWrapper();
|
||||
|
||||
INLINE std::ostream *get_ostream() const;
|
||||
MAKE_PROPERTY(std::ostream, get_ostream);
|
||||
MAKE_PROPERTY(ostream, get_ostream);
|
||||
|
||||
public:
|
||||
void write(const char *buffer, std::streamsize num_bytes);
|
||||
@ -128,7 +128,7 @@ PUBLISHED:
|
||||
~StreamWrapper();
|
||||
|
||||
INLINE std::iostream *get_iostream() const;
|
||||
MAKE_PROPERTY(std::iostream, get_iostream);
|
||||
MAKE_PROPERTY(iostream, get_iostream);
|
||||
|
||||
private:
|
||||
std::iostream *_iostream;
|
||||
|
@ -52,8 +52,6 @@ get_reach() const {
|
||||
*
|
||||
* The object might not necessarily be at rest. Use is_on_ground() if you
|
||||
* want to know whether the object is on the ground and at rest.
|
||||
*
|
||||
* See Also: is_in_outer_space()
|
||||
*/
|
||||
INLINE PN_stdfloat CollisionHandlerGravity::
|
||||
get_airborne_height() const {
|
||||
@ -73,7 +71,7 @@ is_on_ground() const {
|
||||
|
||||
/**
|
||||
* How hard did the object hit the ground. This value is set on impact with
|
||||
* the ground. You may want to watch (poll) on is_on_groun() and when that is
|
||||
* the ground. You may want to watch (poll) on is_on_ground() and when that is
|
||||
* true, call get_impact_velocity(). Normally I avoid polling, but we are
|
||||
* calling is_on_ground() frequently anyway.
|
||||
*/
|
||||
|
@ -123,6 +123,7 @@ HTTPChannel(HTTPClient *client) :
|
||||
_cipher_list = _client->get_cipher_list();
|
||||
_last_status_code = 0;
|
||||
_last_run_time = 0.0f;
|
||||
_download_dest = DD_none;
|
||||
_download_to_ramfile = nullptr;
|
||||
_download_to_stream = nullptr;
|
||||
}
|
||||
|
@ -76,6 +76,14 @@ PUBLISHED:
|
||||
|
||||
void output(std::ostream &out) const;
|
||||
|
||||
PUBLISHED:
|
||||
MAKE_PROPERTY(name, get_name, set_name);
|
||||
MAKE_PROPERTY(value, get_value, set_value);
|
||||
MAKE_PROPERTY(domain, get_domain, set_domain);
|
||||
MAKE_PROPERTY(path, get_path, set_path);
|
||||
MAKE_PROPERTY2(expires, has_expires, get_expires, set_expires, clear_expires);
|
||||
MAKE_PROPERTY(secure, get_secure, set_secure);
|
||||
|
||||
private:
|
||||
bool parse_cookie_param(const std::string ¶m, bool first_param);
|
||||
|
||||
|
@ -140,6 +140,26 @@ open_read_file(bool auto_unwrap) const {
|
||||
return return_file(strstream, auto_unwrap);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fills up the indicated pvector with the contents of the file, if it is a
|
||||
* regular file. Returns true on success, false otherwise.
|
||||
*/
|
||||
bool VirtualFileHTTP::
|
||||
read_file(vector_uchar &result, bool auto_unwrap) const {
|
||||
if (_status_only) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Ramfile ramfile;
|
||||
if (!_channel->download_to_ram(&ramfile, false)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const string &data = ramfile.get_data();
|
||||
std::copy(data.begin(), data.end(), std::back_inserter(result));
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Downloads the entire file from the web server into the indicated iostream.
|
||||
* Returns true on success, false on failure.
|
||||
|
@ -51,6 +51,8 @@ public:
|
||||
virtual std::streamsize get_file_size() const;
|
||||
virtual time_t get_timestamp() const;
|
||||
|
||||
virtual bool read_file(vector_uchar &result, bool auto_unwrap) const;
|
||||
|
||||
private:
|
||||
bool fetch_file(std::ostream *buffer_stream) const;
|
||||
std::istream *return_file(std::istream *buffer_stream, bool auto_unwrap) const;
|
||||
|
@ -1021,7 +1021,7 @@ operator += (const FLOATNAME(LMatrix4) &other) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a memberwise addition between two matrices.
|
||||
* Performs a memberwise subtraction between two matrices.
|
||||
*/
|
||||
INLINE_LINMATH FLOATNAME(LMatrix4) &FLOATNAME(LMatrix4)::
|
||||
operator -= (const FLOATNAME(LMatrix4) &other) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user