glVertex  5.5.2
Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
lgl_PhysicalSphereObject< T > Class Template Referenceabstract

physical sphere object (base template) More...

#include <glvertex_object.h>

Inheritance diagram for lgl_PhysicalSphereObject< T >:
Inheritance graph
[legend]

Public Member Functions

 lgl_PhysicalSphereObject ()
 ctor
 
lglVBOgetVBO ()
 get vbo
 
void setVBO (lglVBO *vbo)
 set vbo
 
virtual vec3 getCenter ()
 get object barycenter relative to object position
 
virtual vec3 getExtent ()
 get bounding box extent
 
T * getPhysicalData ()
 get physical data
 
void setPhysicalData (T *data)
 set physical data
 
virtual T * createPhysicalData ()
 create physical data More...
 
double getPhysicalMass ()
 get physical mass
 
void setPhysicalMass (double mass)
 set physical mass a mass of zero creates a static (immovable) object
 
double getPhysicalRestitution ()
 get physical restitution
 
void setPhysicalRestitution (double restitution)
 set physical restitution
 
void scale (const vec3 &factor)
 scale object by non-uniform factor
 
void setVelocity (vec3 velocity)
 set object velocity
 
vec3 getVelocity ()
 get object velocity
 
virtual void applyForce (vec3 force, vec3 rel_pos=vec3(0, 0, 0))=0
 apply force to point relative to center of mass
 
virtual void applyImpulse (vec3 impulse)=0
 apply linear impulse to center of mass
 
virtual void applyTorque (vec3 torque)=0
 apply angular impulse to center of mass
 
vec4 getColor ()
 get object color
 
void setColor (const vec4 &c)
 set object color
 
bool hasTransparency ()
 get object transparency flag
 
void hasTransparency (bool flag)
 set object transparency flag
 
bool hasPartialTransparency ()
 get partial object transparency flag
 
void hasPartialTransparency (bool flag)
 set partial object transparency flag
 
mat4 getTransformation ()
 get object transformation
 
vec3 getPosition ()
 get object position
 
mat3 getRotation ()
 get object rotation
 
vec3 getScale ()
 get object scale
 
double getMaxScale ()
 get maximum object scale
 
bool hasUniformScale ()
 object has uniform scale?
 
bool hidden ()
 is the object hidden?
 
bool shown ()
 is the object shown?
 
void hide (bool yes=true)
 hide object
 
void show (bool yes=true)
 show object
 
void renderTransformedObject ()
 render transformed object
 
virtual double getDistanceToObject (const vec3 &v)
 compute minimum distance to transformed object
 

Protected Member Functions

virtual double getRadius ()
 get bounding object radius
 
virtual double getNorm ()
 get object norm
 

Static Protected Member Functions

static double getDistanceToSphere (const vec3 &p, const vec3 &v, double radius)
 compute minimum distance to sphere
 
static double getDistanceToBox (const vec3 &p, const vec3 &v, const vec3 &ext)
 compute minimum distance to box
 
static double getDistanceToBox (const vec3 &p, const mat3 &rotation, const vec3 &v, const vec3 &ext)
 compute minimum distance to rotated box
 
static double getDistanceToBox (const vec3 &p, const mat3 &rotation, const vec3 &offset, const vec3 &v, const vec3 &ext)
 compute minimum distance to rotated and displaced box
 

Detailed Description

template<typename T>
class lgl_PhysicalSphereObject< T >

physical sphere object (base template)

Member Function Documentation

◆ createPhysicalData()

template<typename T >
virtual T* lgl_PhysicalObject< T >::createPhysicalData ( )
inlinevirtualinherited

create physical data

  • to be reimplemented by physics engine

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