C3D Toolkit
Kernel - 117982, Vision - 2.9.2.2
|
A class for 3D scene rendering, using virtual camera. More...
#include <vsn_camera.h>
Public Member Functions | |
Camera () | |
Default constructor. More... | |
Camera (const Point3DF &, const Point3DF &, const Vector3DF &) | |
Constructor by parameters. | |
Camera (const Camera &other) | |
Copy constructor. | |
virtual | ~Camera () |
Destructor. | |
void | Init (const Point3DF &position, const Point3DF &targetPosition, const Vector3DF &up) |
Initializes the camera by parameters. | |
void | Init (const Point3DF &position, const Vector3DF &up) |
Initializes the camera by parameters. | |
void | Init (const Point3DF &position) |
Initializes the camera by parameter. | |
void | InitTarget (const Point3DF &targetPosition) |
Initializes the camera by parameter. | |
void | Init (const Camera &other) |
Initializes the camera by other camera. | |
double | DistanceCameraToTarget () const |
Returns a real distance between target and camera. | |
void | SetDistanceCameraToTarget (double dis) |
Sets new distance between target and camera, i.e. replace the camera. This value must be positive. | |
void | SetDistanceTargetToCamera (double dis) |
Sets new distance between target and camera, i.e. replace the camera. This value must be positive. | |
const Point3DF & | GetPosition () const |
Returns camera position. | |
void | SetPosition (const Point3DF &position) |
Sets new position for the camera. The default position is (0, 0, 1). | |
const Point3DF & | GetTargetPosition () const |
Returns position of scene target. The default position of target is the origin. | |
void | SetPositionTarget (const Point3DF &targetPosition) |
Sets position of target. The default position of target is the origin. | |
const Vector3DF & | GetUpVector () const |
Returns up vector of the camera. The default value is (0, 1, 0). | |
void | SetUpVector (const Vector3DF &up) |
Sets up vector of the camera. The default value is (0, 1, 0). | |
Vector3DF | GetForward () const |
Returns view vector from camera to target. | |
Vector3DF | GetSideVector () const |
Returns vector from the camera. | |
const Matrix3DF & | GetViewMatrix () const |
Returns view matrix (camera matrix). | |
const Vector3DF & | GetDefaultUpVector () const |
Returns the default up vector of the camera. | |
void | SetDefaultUpVector (const Vector3DF &vecUp) |
Sets the default up vector of the camera. | |
void | SetViewOrientation (Orientation orientation) |
Sets standard view of orientation. | |
Matrix3DF | GetModelViewMatrix () const |
Returns view matrix of the camera. | |
void | RotateSpherical (const Vector3DF &vectOld, const Vector3DF &vectCur) |
Rotates around the world origin (by orbit). | |
void | Pan (const Vector3DF &vectShift) |
View panning. | |
void | SetZoom (double factor) |
Moves vector of the camera along view vector(factor must be more 0). | |
void | Transform (const Matrix3DF &matMove) |
Changes the camera position by the defined matrix. | |
void | RotateAbout (const Vector3DF &axis, double angle, const Point3DF &pnt) |
Rotates about the axis. | |
void | RotateAboutTarget (const Vector3DF &vec, double angle) |
Rotates about the target( its origin). | |
void | Translate (const Vector3DF &vecTrans) |
Moves the camera by vector. | |
void | Orbit (double angle1, double angle2) |
Moves the camera about scene target. More... | |
void | Roll (double angle) |
Rotates camera about view axis. More... | |
void | MultMatrix () |
Sets OpenGL camera before the whole scene rendering. | |
bool | operator== (const Camera &other) const |
Equality operator. | |
![]() | |
Essence (Node *pParent=nullptr) | |
Default constructor setting parent node. | |
virtual | ~Essence () |
Destructor. | |
void | AddFeature (Feature *pFeature) |
Adds new pointer to Feature. | |
void | RemoveFeature (Feature *pFeature) |
Removes specified pointer to Feature. | |
FeatureVector | GetFeatures () const |
Returns feature instance list to which Essence refers. | |
Essence * | GetParentEssence () const |
Returns pointer to Essence parent instance. | |
![]() | |
Node (Node *pParent=nullptr) | |
Constructor with parent. | |
virtual | ~Node () |
Destructor. | |
NodeKey | GetUniqueKey () const |
Returns key identifing Node instance. | |
void | SetUniqueKey (const NodeKey &key) |
Sets the unique key for the instance. | |
NodeKey | GetCustomKey () const |
Returns custom key identifing Node instance. | |
void | SetCustomKey (const NodeKey &key) |
Sets the custom unique key for the instance. | |
Node * | GetParentNode () const |
Returns pointer to the parent object or nullptr if no parent. | |
bool | IsEnabled () const |
Returns the Node enabled flag. By default, the flag is always on. | |
ObjectList< Node * > | GetChildNodes () const |
Return an array of child nodes for this node. | |
void | SetParent (Node *pParent) |
Sets parent object to the object. | |
bool | IsNotificationsBlocked () const |
True if notifications are blocked, otherwise, False. | |
bool | SetBlockNotifications (bool block) |
Sets blocking of notifications and returns the previous blocking value. | |
![]() | |
Object (Object *pParent=nullptr) | |
Default constructor. More... | |
virtual | ~Object () |
Destructor. | |
void | SetParent (Object *pParent) |
NO TRANSLATION. | |
Mutex * | GetMutex () |
Object mutex. | |
String | GetObjectName () const |
Returns name. | |
void | SetObjectName (const String &name) |
Sets name. | |
bool | IsControlType () const |
TRANSLATION. | |
Object * | GetParent () const |
NO TRANSLATION. | |
Variant | GetProperty (const String &name) const |
NO TRANSLATION. | |
bool | IsSignalsBlocked () const |
NO TRANSLATION. | |
bool | SetBlockSignals (bool bBlock) |
NO TRANSLATION. | |
void | AddEventListener (Object *pObject) |
NO TRANSLATION. | |
void | RemoveEventListener (Object *pObject) |
NO TRANSLATION. | |
Object * | GetSender () const |
NO TRANSLATION. | |
Thread * | GetThread () const |
NO TRANSLATION. | |
void | BindWithThread (Thread *thread) |
NO TRANSLATION. | |
int | StartTimer (int interval, TimerType timerType=tt_CoarseTimer) |
NO TRANSLATION. | |
void | KillTimer (int id) |
NO TRANSLATION. | |
const ObjectList< Object * > & | GetChildren () const |
NO TRANSLATION. | |
template<typename T > | |
T | FindChild (const String &objName=String()) const |
NO TRANSLATION. | |
template<typename T > | |
ObjectList< T > | FindChildren (const String &objName=String(), VSN::ChildFindingPolicies policies=VSN::FindAllNestedChildren) const |
NO TRANSLATION. | |
![]() | |
BasicObject () | |
Default constructor. | |
virtual | ~BasicObject () |
Destructor. | |
Additional Inherited Members | |
![]() | |
Essence (EssencePrivate &dd, Node *parent=nullptr) | |
Constructor setting parent node and private data. | |
![]() | |
Node (NodePrivate &dd, Node *pParent) | |
Sets the node enable flag. More... | |
virtual void | SceneModificationEvent (const std::shared_ptr< SceneModification > &modification) |
The function is called in case of scene being modified. | |
A class for 3D scene rendering, using virtual camera.
A virtual camera class for 3D scene rendering. It represents a lot of different methods for positioning, camera orientation, and also gives a point of scene view. When rendering a scene the camera initializes matrix of projection and view matrix. Camera can be positioned in front of any scene segment for its right rendering. The default position and orientation of the camera are (0,0,1) with a view direction along negative axis.
VSN::Camera::Camera | ( | ) |
Default constructor.
Default constructor. The position of view is (0, 0, 1), up vector is initialized by y-axis (0, 1, 0). View angle is 30 degrees, clipping range is (0.1, 1000.0).
void VSN::Camera::Orbit | ( | double | angle1, |
double | angle2 | ||
) |
Moves the camera about scene target.
[in] | angle1 | - The distance, in radians, that camera passes around the target from left to right. Can be negative. |
[in] | angle2 | - The distance, in radians, that camera passes around the target from bottom to top. Can be negative. |
void VSN::Camera::Roll | ( | double | angle | ) |
Rotates camera about view axis.
[in] | angle | - Rotation angle of the camera, in radians, about view axis. |