PlanarArrowGraphicalMarker Class Reference

A graphical object displaying a planar arrow. More...

Inheritance diagram for PlanarArrowGraphicalMarker:

Public Member Functions

 PlanarArrowGraphicalMarker (real arrowLength, real arrowTailWidth, real arrowHeadWidth, real arrowTailPortion, World *world, QString name="unamed", const wMatrix &tm=wMatrix::identity())
 Constructor.
 
virtual ~PlanarArrowGraphicalMarker ()
 Destructor.
 
- Public Member Functions inherited from GraphicalWObject
 GraphicalWObject (World *world, QString name="unamed", const wMatrix &tm=wMatrix::identity())
 Constructor.
 
virtual ~GraphicalWObject ()
 Destructor.
 
WObjectattachedObject () const
 The object to which we are attached.
 
void attachToObject (WObject *object, bool makeOwner=false, const wMatrix &displacement=wMatrix::identity())
 Attaches this object to another WObject.
 
const wMatrixgetDisplacement () const
 Returns the displacement matrix relative to the object to which we are attached.
 
void setDisplacement (const wMatrix &displacement)
 Sets the displacement matrix relative to the object to which we are attached.
 
void updateAndCalculateAABB (wVector &minPoint, wVector &maxPoint, const wMatrix tm)
 Returns the min and max points of the Axis-Aligned Bounding Box (AABB)
 
void updateAndCalculateOBB (wVector &dimension, wVector &minPoint, wVector &maxPoint)
 Returns the dimension of the Oriented Bounding Box (OBB) in the object local frame.
 
void updateAndRender (RenderWObject *renderer, QGLContext *gw)
 Performs the actual drawing.
 
void updateAndRenderAABB (RenderWObject *renderer, RenderWorld *gw)
 The function rendering the Axis-Aligned Bounding Box (AABB)
 
- Public Member Functions inherited from WObject
 WObject (World *world, QString name="unamed", const wMatrix &tm=wMatrix::identity(), bool addToWorld=true)
 create the object and automatically put this into the world
 
virtual ~WObject ()
 destroy the Object and drop it from the world
 
QColor color () const
 return the color of this object
 
bool isInvisible ()
 return if it is invisible
 
const wMatrixmatrix () const
 return a reference to the transformation matrix
 
QString name () const
 Return the name of this object.
 
virtual void postUpdate ()
 postUpdate the WObject this method is called at each step of the world just after the physic update
 
virtual void preUpdate ()
 preUpdate the WObject this method is called at each step of the world just before the physic update
 
void setAlpha (int alpha)
 set the value of alpha channel (the transparency)
 
void setColor (QColor c)
 Set the color to use on rendering.
 
void setInvisible (bool b)
 set invisibility
 
void setMatrix (const wMatrix &newm)
 set a new matrix
 
void setPosition (const wVector &newpos)
 set the position specified in global coordinate frame
 
void setPosition (real x, real y, real z)
 set the position specified in global coordinate frame
 
void setTexture (QString textureName)
 Set the texture to use for this WObject when rendered.
 
void setUseColorTextureOfOwner (bool b)
 set if the object will be rendered with the color and texture of our owner (if we have one)
 
QString texture () const
 Return the texture name.
 
bool useColorTextureOfOwner () const
 if true, we will use color and texture of our owner (if we have one)
 
Worldworld ()
 Return the world.
 
const Worldworld () const
 Return the world (const version)
 
- Public Member Functions inherited from Ownable
 Ownable ()
 Constructor.
 
virtual ~Ownable ()
 Destructor.
 
const QList< Owned > & owned () const
 Returns the list of objects owned by this one.
 
Ownableowner () const
 Returns the owner of this object.
 
void setOwner (Ownable *owner, bool destroy=true)
 Sets the owner of this object.
 

Protected Member Functions

virtual void render (RenderWObject *renderer, QGLContext *gw)
 Performs the actual drawing.
 
- Protected Member Functions inherited from GraphicalWObject
virtual void calculateAABB (wVector &minPoint, wVector &maxPoint, const wMatrix tm)
 Returns the min and max points of the Axis-Aligned Bounding Box (AABB)
 
virtual void calculateOBB (wVector &dimension, wVector &minPoint, wVector &maxPoint)
 Returns the dimension of the Oriented Bounding Box (OBB) in the object local frame If there is no meaningful OBB, set dimension, minPoint and maxPoint to (0, 0, 0), as the default implementation does.
 
virtual void renderAABB (RenderWObject *renderer, RenderWorld *gw)
 The function rendering the Axis-Aligned Bounding Box (AABB)
 
void updateMatrixFromAttachedObject ()
 Updates the transformation matrix from the object to which we are attached (if there is one)
 
- Protected Member Functions inherited from WObject
virtual void changedMatrix ()
 virtual function called when the transformation matrix change
 

Additional Inherited Members

- Public Types inherited from Ownable
typedef QList< OwnedOwnedList
 The type for the list of owned objects.
 
- Protected Attributes inherited from WObject
QColor colorv
 Color, it contains also alpha channel.
 
bool invisible
 if TRUE it will not renderized
 
QString namev
 Name of the WObject.
 
QString texturev
 Texture name.
 
wMatrix tm
 Trasformation matrix.
 
bool usecolortextureofowner
 if true, we will use color and texture of our owner (if we have one).
 
Worldworldv
 World.
 

Detailed Description

A graphical object displaying a planar arrow.

The arrow lies in the local z = 0 plane and points towards x > 0. The tail is in the origin of the local frame of reference. It has a solid color (no light effects).

Definition at line 92 of file graphicalmarkers.h.

Constructor & Destructor Documentation

PlanarArrowGraphicalMarker ( real  arrowLength,
real  arrowTailWidth,
real  arrowHeadWidth,
real  arrowTailPortion,
World world,
QString  name = "unamed",
const wMatrix tm = wMatrix::identity() 
)

Constructor.

Parameters
arrowLengththe length of the arrow
arrowTailWidththe width of the tail of the arrow
arrowHeadWidththe width of the head of the arrow
arrowTailPortionthe percentage of the arrow occupied by its tail. This is a value betwee 0.0 and 1.0
worldthe world the object lives in
namethe name of this object
tmthe transformation matrix for this object

Definition at line 66 of file graphicalmarkers.cpp.

Destructor.

Definition at line 75 of file graphicalmarkers.cpp.

Member Function Documentation

void render ( RenderWObject renderer,
QGLContext *  gw 
)
protectedvirtual

Performs the actual drawing.

Reimplement to draw what you need

Parameters
rendererthe RenderWObject object associated with this one. Use it e.g. to access the container
gwthe OpenGL context

Implements GraphicalWObject.

Definition at line 79 of file graphicalmarkers.cpp.

References WObject::color(), RenderWObject::container(), RenderWObjectContainer::setupColorTexture(), and WObject::tm.


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