glVertex  5.5.2
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
lgl_CameraNode Class Reference

camera node More...

#include <glvertex_nodes.h>

Inheritance diagram for lgl_CameraNode:
Inheritance graph
[legend]

Public Types

enum  lgl_control_mode_enum
 control mode enum
 
enum  lgl_export_enum
 scene graph export modes
 

Public Member Functions

virtual std::string getClassId () const
 get the class id
 
virtual void control (bool override=true)
 control the node as specified by the control mode
 
lgl_control_mode_enum getControlMode () const
 get the control mode
 
void setControlMode (lgl_control_mode_enum mode)
 set the control mode
 
virtual bool stateless () const
 is the node stateless?
 
std::string getId () const
 get the node identifier
 
void setId (const std::string &id="")
 set the node identifier
 
std::string getAltId () const
 get the alternate node identifier
 
void setAltId (const std::string &id="")
 set the alternate node identifier
 
unsigned int children () const
 get the number of children of the node
 
bool leaf () const
 is the node a leaf?
 
unsigned int references () const
 get the number of references to the node
 
bool shared () const
 is the node shared?
 
lgl_Nodeget (unsigned int i=0) const
 get a child node
 
template<class T >
T * add (T *node)
 add a child node with a specific type
 
void remove (unsigned int i=0)
 remove a child from the node
 
void replace (lgl_Node *node, unsigned int i=0)
 replace a child of the node
 
lgl_Nodetake (unsigned int i=0)
 unlink a child and take ownership
 
void link (lgl_Node *node)
 add the links of a node
 
void unlink ()
 remove the links of the node
 
virtual bool checkForCycles ()
 check for graph cycles
 
bool enabled () const
 is the node enabled?
 
bool disabled () const
 is the node disabled?
 
void enable (bool yes=true)
 enable the node
 
void disable (bool yes=true)
 disable the node
 
void toggle ()
 toggle the node
 
bool shown () const
 is the node shown?
 
bool hidden () const
 is the node hidden?
 
void show (bool yes=true)
 show the node and its children
 
void hide (bool yes=true)
 hide the node and its children
 
virtual lgl_Nodefind (const std::string &id)
 find a node with a specific identifier
 
template<class T >
T * find ()
 find a node with a specific type
 
template<class T >
T * find (const std::string &id)
 find a node with a specific identifier and type
 
void renderSceneGraph (double dt=0)
 render and update the entire scene subgraph
 
void drawSceneGraph (vec4 color=vec4(1))
 draw the entire scene subgraph without updating
 
void drawSceneGraph (const mat4 &m)
 draw the entire scene subgraph without updating
 
void preupdateSceneGraph (double dt)
 pre-update the entire scene subgraph
 
void updateSceneGraph (double dt)
 update the entire scene subgraph
 
virtual void getBoundingBox (vec3 &bboxmin, vec3 &bboxmax)
 get the bounding box of the entire subgraph More...
 
double getBoundingSphere (vec3 &center)
 get the bounding sphere of the entire subgraph More...
 
vec3 getCenter ()
 get the bounding box center of the entire subgraph
 
vec3 getExtent ()
 get the bounding box extent of the entire subgraph
 
double getRadius ()
 get the bounding sphere radius of the entire subgraph More...
 
double getNorm ()
 get the bounding sphere norm of the entire subgraph More...
 
virtual std::vector< vec4getVertexCoordinates (mat4 trans=mat4())
 
void getExactBoundingBox (vec3 &bboxmin, vec3 &bboxmax)
 get the exact bounding box of the entire subgraph More...
 
lglVBOpickSceneGraph (vec3 origin, vec3 direction, double mindist=0)
 pick the entire scene subgraph
 
bool hasTransparency ()
 check the entire subgraph whether or not it contains semi-transparent geometry
 
virtual unsigned int countAll ()
 count all nodes (count multiply linked nodes)
 
virtual unsigned int countAllOnce ()
 count all nodes (count multiply linked nodes once)
 
virtual unsigned int countAllPrimitives ()
 count all primitives
 
unsigned int countAllVertices ()
 count all vertices
 
virtual bool ordered () const
 is the node ordered?
 
bool convertable () const
 is the node convertable?
 
bool cloneable () const
 is the node cloneable?
 
bool optimizable () const
 is the node optimizable?
 
virtual void optimizeAll ()
 optimize all nodes
 
virtual void restartAll (double animation=0)
 restart all animations
 
virtual void pauseAll (bool yes=true)
 pause all animations
 
virtual void speedupAll (double speedup=1)
 speedup all animations
 
virtual void finishAll ()
 finish all transitions
 
std::string exportAll (lgl_export_enum mode=LGL_EXPORT_NODES, int indentation=0, int increment=3)
 export all nodes
 
void exportNodes (std::string filename)
 export graph nodes
 
void exportGraph (std::string filename)
 export link graph
 
void exportCommands (std::string filename)
 export graphics commands
 
bool saveObj (std::string filename)
 save into OBJ file
 
void setOrthographic (double left, double right, double bottom, double top, double front, double back)
 set camera type to orthographic
 
void setPerspective (double fovy, double aspect, double nearp, double farp)
 set camera type to perspective
 
void setPerspective (double fovy, double nearp, double farp)
 set camera type to perspective
 
void setAspect (double aspect)
 set camera aspect
 
void setEye (vec3 eye, vec3 lookat, vec3 up)
 set eye and lookat point and up vector
 
void setEye (vec3 eye, vec3 lookat)
 set eye and lookat point
 
vec3 getEye (bool left=true) const
 get eye point
 
vec3 getEyeManip (bool left=true) const
 get manipulated eye point
 
vec3 getLookAt () const
 get lookat point
 
vec3 getDirection () const
 get viewing direction
 
vec3 getRight () const
 get right vector
 
vec3 getUp () const
 get up vector
 
vec3 unprojectViewport (double x, double y)
 unproject viewport coordinate into view coordinate direction
 
vec3 unprojectViewportToWorld (double x, double y)
 unproject viewport coordinate into world coordinate direction
 
bool isVisible (const vec3 &center, double radius)
 bounding sphere visibility test
 
bool isVisible (const vec3 &center, const vec3 &extent)
 bounding box visibility test
 
void setStereoBase (double base)
 set stereo base
 
double getStereoBase () const
 get stereo base
 
bool isStereoCam () const
 is stereo cam?
 
void useLeftEye (bool left=true)
 use left eye for stereo rendering
 
void useRightEye (bool right=true)
 use right eye for stereo rendering
 
bool isLeftEye () const
 is left eye?
 
bool isRightEye () const
 is right eye?
 
mat4 getProjectionMatrix () const
 get projection matrix
 
mat4 getViewMatrix (bool left=true) const
 get viewing matrix
 
mat4 getInverseViewMatrix (bool left=true) const
 get inverse viewing matrix
 
mat4 getInverseTransposeViewMatrix (bool left=true) const
 get inverse transpose viewing matrix
 
mat4 getViewProjectionMatrix (bool left=true) const
 get combined viewing and projection matrix
 
void begin (bool left=true) const
 push viewing and projection matrix
 
void end () const
 pop viewing and projection matrix
 
void halt (bool yes=true)
 halt cam
 
void resume (bool yes=true)
 resume cam
 
void reset ()
 reset cam manipulator
 

Static Public Member Functions

static GLgetGL ()
 get the scene graph GL singleton
 

Protected Member Functions

lgl_Nodeadd_node (lgl_Node *node)
 add a child to the node
 
virtual void render ()
 reimplement this method to render a node
 
virtual void update (double dt)
 reimplement this method to update a node
 
virtual void pick ()
 reimplement this method to pick a node
 

Detailed Description

camera node

a camera node defines the viewing and projection parameters

Member Function Documentation

◆ getBoundingBox()

virtual void lgl_Node::getBoundingBox ( vec3 bboxmin,
vec3 bboxmax 
)
inlinevirtualinherited

get the bounding box of the entire subgraph

  • the bounding box is invalid if a maximum component is less than the minimum component

Reimplemented in lgl_SubgraphNode.

◆ getBoundingSphere()

double lgl_Node::getBoundingSphere ( vec3 center)
inlineinherited

get the bounding sphere of the entire subgraph

  • returns the radius of the bounding sphere
  • the bounding sphere is invalid if the radius is zero

◆ getExactBoundingBox()

void lgl_Node::getExactBoundingBox ( vec3 bboxmin,
vec3 bboxmax 
)
inlineinherited

get the exact bounding box of the entire subgraph

  • this is a computationally expensive operation

◆ getNorm()

double lgl_Node::getNorm ( )
inlineinherited

get the bounding sphere norm of the entire subgraph

  • zero norm means that the subgraph does not contain valid geometry

◆ getRadius()

double lgl_Node::getRadius ( )
inlineinherited

get the bounding sphere radius of the entire subgraph

  • zero radius means that the subgraph does not contain valid geometry

◆ getVertexCoordinates()

virtual std::vector<vec4> lgl_Node::getVertexCoordinates ( mat4  trans = mat4())
inlinevirtualinherited
  • this is a computationally expensive operation

Reimplemented in lgl_SubgraphNode.


The documentation for this class was generated from the following file: