Redesign of animation queue for unreal, add get_tangibles_near to drivenengine
This commit is contained in:
@@ -281,6 +281,26 @@ void StreamBuffer::write_double(double d) {
|
||||
write_cursor_ += 8;
|
||||
}
|
||||
|
||||
void StreamBuffer::write_xyz(const util::XYZ &xyz) {
|
||||
make_space(12);
|
||||
memcpy(write_cursor_, &xyz.x, 4);
|
||||
write_cursor_ += 4;
|
||||
memcpy(write_cursor_, &xyz.y, 4);
|
||||
write_cursor_ += 4;
|
||||
memcpy(write_cursor_, &xyz.z, 4);
|
||||
write_cursor_ += 4;
|
||||
}
|
||||
|
||||
void StreamBuffer::write_dxyz(const util::DXYZ &xyz) {
|
||||
make_space(24);
|
||||
memcpy(write_cursor_, &xyz.x, 8);
|
||||
write_cursor_ += 8;
|
||||
memcpy(write_cursor_, &xyz.y, 8);
|
||||
write_cursor_ += 8;
|
||||
memcpy(write_cursor_, &xyz.z, 8);
|
||||
write_cursor_ += 8;
|
||||
}
|
||||
|
||||
int8_t StreamBuffer::read_int8() {
|
||||
check_available(1);
|
||||
int8_t v;
|
||||
@@ -336,6 +356,32 @@ double StreamBuffer::read_double() {
|
||||
return d;
|
||||
}
|
||||
|
||||
util::XYZ StreamBuffer::read_xyz() {
|
||||
check_available(12);
|
||||
util::XYZ result;
|
||||
memcpy(&result.x, read_cursor_, 4);
|
||||
read_cursor_ += 4;
|
||||
memcpy(&result.y, read_cursor_, 4);
|
||||
read_cursor_ += 4;
|
||||
memcpy(&result.z, read_cursor_, 4);
|
||||
read_cursor_ += 4;
|
||||
return result;
|
||||
}
|
||||
|
||||
util::DXYZ StreamBuffer::read_dxyz() {
|
||||
check_available(24);
|
||||
util::DXYZ result;
|
||||
memcpy(&result.x, read_cursor_, 8);
|
||||
read_cursor_ += 8;
|
||||
memcpy(&result.y, read_cursor_, 8);
|
||||
read_cursor_ += 8;
|
||||
memcpy(&result.z, read_cursor_, 8);
|
||||
read_cursor_ += 8;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void StreamBuffer::write_hashvalue(const util::HashValue &hv) {
|
||||
write_uint64(hv.first);
|
||||
write_uint64(hv.second);
|
||||
|
||||
Reference in New Issue
Block a user