#include <aabb.h>
Inheritance diagram for AABB:
Public Types | |
enum | BOUNDINGVOLUMETYPE { BV_AABB, BV_OBB, BV_SPHERE, BV_CAPSULE } |
Bounding volume type identifiers. More... | |
Public Member Functions | |
AABB (const Vector3d &rkDim=Vector3d::ZERO) | |
AABB (const AABB &rkAABB) | |
virtual bool | Intersection (BoundingVolume *pkObj, ContactSet *pkContactSet=0, bool bInvertNormal=false) |
virtual bool | Intersection (AABB *pkAABB, ContactSet *pkContactSet=0, bool bInvertNormal=false) |
virtual bool | Intersection (OBB *pkOBB, ContactSet *pkContactSet=0, bool bInvertNormal=false) |
virtual bool | Intersection (Sphere *pkSphere, ContactSet *pkContactSet=0, bool bInvertNormal=false) |
virtual bool | Intersection (Capsule *pkCapsule, ContactSet *pkContactSet=0, bool bInvertNormal=false) |
virtual bool | Intersection (Frustum *pkFrustum) |
virtual bool | Intersection (const Vector3d &rkV0, const Vector3d &rkV1, const Vector3d &rkV2, ContactSet *pkContactSet=0, bool bForceTriNormal=true, const Vector3d &rkNormal=Vector3d::ZERO) |
virtual bool | Intersection (const Vector3d &rkPoint) |
virtual bool | Intersection (const Ray &rkRay, ContactSet *pkContactSet=0) |
virtual bool | Intersection (const Line &rkLine) |
virtual bool | Intersection (const Plane &rkPlane) |
virtual void | Generate (AABB *pkAABB) |
virtual void | Generate (OBB *pkOBB) |
virtual void | Generate (Sphere *pkSphere) |
virtual void | Generate (Capsule *pkCapsule) |
virtual void | Generate (VertexBufferPtr &pkVertexBuffer) |
virtual void | Merge (AABB *pkAABB) |
virtual void | Merge (OBB *pkOBB) |
virtual void | Merge (Sphere *pkSphere) |
virtual void | Merge (Capsule *pkCapsule) |
virtual void | SetDim (const Vector3d &rkDim) |
virtual void | SetRotation (const Quaternion &rkRotation, bool bNotifyUpdate=true) |
const Vector3d & | GetDim () const |
const Vector3d & | GetRealDim () const |
float | GetRadius () const |
virtual BOUNDINGVOLUMETYPE | GetType () |
virtual BoundingVolume * | Duplicate () const |
virtual void | RenderOutlines (const Color &rkColor=Color::GREEN) const |
void | Generate (BoundingVolume *pkObj) |
void | Merge (BoundingVolume *pkObj) |
const Vector3d & | GetTranslation () const |
const Quaternion & | GetRotation () const |
float | GetScaling () const |
void | Translate (const Vector3d &rkTranslation, bool bNotifyUpdate=true) |
void | TranslateWorld (const Vector3d &rkTranslation, bool bNotifyUpdate=true) |
void | Rotate (const Quaternion &rkRotation, bool bNotifyUpdate=true) |
void | RotateWorld (const Quaternion &rkRotation, bool bNotifyUpdate=true) |
void | Scale (float fScaling, bool bNotifyUpdate=true) |
virtual void | SetTranslation (const Vector3d &rkTranslation, bool bNotifyUpdate=true) |
virtual void | SetScaling (float fScaling, bool bNotifyUpdate=true) |
Protected Member Functions | |
void | RecalcDim () |
Protected Attributes | |
Vector3d | m_kRealDim |
Vector3d | m_kDim |
float | m_fRadius |
float | m_fScaling |
Quaternion | m_kRotation |
Vector3d | m_kTranslation |
|
Bounding volume type identifiers.
|
|
|
|
|
|
Recalculate dimensions |
|
Intersection test with unknown object type
Implements BoundingVolume. |
|
Intersection with AABB
Implements BoundingVolume. |
|
Intersection with OBB
Implements BoundingVolume. |
|
Intersection with sphere
Implements BoundingVolume. |
|
Intersection with capsule
Implements BoundingVolume. |
|
Intersection with frustum
Implements BoundingVolume. |
|
Intersection with polygon
Implements BoundingVolume. |
|
Intersection with point
Implements BoundingVolume. |
|
Intersection with ray
Implements BoundingVolume. |
|
Intersection with line
Implements BoundingVolume. |
|
Intersection with plane
Implements BoundingVolume. |
|
Generate from AABB
Implements BoundingVolume. |
|
Generate from OBB
Implements BoundingVolume. |
|
Generate from sphere
Implements BoundingVolume. |
|
Generate from capsule
Implements BoundingVolume. |
|
Generate from vertex soup
Implements BoundingVolume. |
|
Merge with AABB
Implements BoundingVolume. |
|
Merge with OBB
Implements BoundingVolume. |
|
Merge with sphere
Implements BoundingVolume. |
|
Merge with capsule
Implements BoundingVolume. |
|
Set dimensions of AABB in unrotated coordinate system
|
|
Set rotation for AABB. We overload method to update the "real" dimension of the AABB
Reimplemented from SRTNode. |
|
|
|
|
|
|
|
Implements BoundingVolume. |
|
Implements BoundingVolume. |
|
Render volume outlines
Implements BoundingVolume. |
|
Generate from unknown object
|
|
Merge with unknown object
|
|
|
|
|
|
|
|
Translate node from current position, in local (along current rotated axes) coordinate system. Will call SetTranslation() for setting new translation of node, derived classes do not need to overload this method directly. Not affected by current scaling.
|
|
Translate node from current position, in world (along unrotated axes) coordinate system. Will call SetTranslation() for setting new translation of node, derived classes do not need to overload this method directly. Not affected by current scaling.
|
|
Rotate node in local (current rotation) coordinate system. Will call SetRotation() for setting new rotation of node, derived classes do not need to overload this method directly. Not affected by current scaling.
|
|
Rotate node in world (unrotated) coordinate system. Will call SetRotation() for setting new rotation of node, derived classes do not need to overload this method directly. Not affected by current scaling.
|
|
Scale node by uniform factor. Will use SetScaling for setting new scaling of node, derived classes do not need to overload this method directly. Must be >0, where a value of 1.0f indicates no scaling
|
|
Set translation for node. Derived classes used in hierarchy trees can overload this method and implement caching of world data, or use flag to indicate update needed later.
Reimplemented in HierarchyNode, HierarchyNode< Bone >, and HierarchyNode< SceneNode >. |
|
Set uniform scaling for node. Derived classes used in hierarchy trees can overload this method and implement caching of world data, or use flag to indicate update needed later. A value of 1.0f indicates no scaling.
Reimplemented in HierarchyNode, HierarchyNode< Bone >, and HierarchyNode< SceneNode >. |
|
Dimensions (calculated from real dim + rot) |
|
Real dimension |
|
Length of dimension vector (bounding-sphere radius) |
|
Uniform scaling factor (must be >0, default 1) |
|
Rotation |
|
Translation |