mirror of
https://github.com/aap/librw.git
synced 2025-12-19 17:09:51 +00:00
add camera example
This commit is contained in:
12
src/rwbase.h
12
src/rwbase.h
@@ -278,7 +278,7 @@ struct Quat
|
||||
this->w = w; this->x = x; this->y = y; this->z = z; }
|
||||
V3d vec(void){ return makeV3d(x, y, z); }
|
||||
|
||||
Quat *rotate(const V3d *axis, float32 angle, CombineOp op);
|
||||
Quat *rotate(const V3d *axis, float32 angle, CombineOp op = rw::COMBINEPOSTCONCAT);
|
||||
};
|
||||
|
||||
inline Quat makeQuat(float32 w, float32 x, float32 y, float32 z) { Quat q = { x, y, z, w }; return q; }
|
||||
@@ -347,11 +347,11 @@ struct Matrix
|
||||
static Matrix *mult(Matrix *dst, const Matrix *src1, const Matrix *src2);
|
||||
static Matrix *invert(Matrix *dst, const Matrix *src);
|
||||
static Matrix *transpose(Matrix *dst, const Matrix *src);
|
||||
Matrix *rotate(const V3d *axis, float32 angle, CombineOp op);
|
||||
Matrix *rotate(const Quat &q, CombineOp op);
|
||||
Matrix *translate(const V3d *translation, CombineOp op);
|
||||
Matrix *scale(const V3d *scl, CombineOp op);
|
||||
Matrix *transform(const Matrix *mat, CombineOp op);
|
||||
Matrix *rotate(const V3d *axis, float32 angle, CombineOp op = rw::COMBINEPOSTCONCAT);
|
||||
Matrix *rotate(const Quat &q, CombineOp op = rw::COMBINEPOSTCONCAT);
|
||||
Matrix *translate(const V3d *translation, CombineOp op = rw::COMBINEPOSTCONCAT);
|
||||
Matrix *scale(const V3d *scl, CombineOp op = rw::COMBINEPOSTCONCAT);
|
||||
Matrix *transform(const Matrix *mat, CombineOp op = rw::COMBINEPOSTCONCAT);
|
||||
Quat getRotation(void);
|
||||
void lookAt(const V3d &dir, const V3d &up);
|
||||
|
||||
|
||||
@@ -70,10 +70,10 @@ struct Frame
|
||||
bool32 dirty(void) const {
|
||||
return !!(this->root->object.privateFlags & HIERARCHYSYNC); }
|
||||
Matrix *getLTM(void);
|
||||
void rotate(const V3d *axis, float32 angle, CombineOp op);
|
||||
void translate(const V3d *trans, CombineOp op);
|
||||
void scale(const V3d *scale, CombineOp op);
|
||||
void transform(const Matrix *mat, CombineOp op);
|
||||
void rotate(const V3d *axis, float32 angle, CombineOp op = rw::COMBINEPOSTCONCAT);
|
||||
void translate(const V3d *trans, CombineOp op = rw::COMBINEPOSTCONCAT);
|
||||
void scale(const V3d *scale, CombineOp op = rw::COMBINEPOSTCONCAT);
|
||||
void transform(const Matrix *mat, CombineOp op = rw::COMBINEPOSTCONCAT);
|
||||
void updateObjects(void);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user