source: GTP/trunk/App/Games/Jungle_Rumble/src/physic/physics/include/NxBoxShape.h @ 1378

Revision 1378, 3.1 KB checked in by giegl, 18 years ago (diff)

GTPD - Jungle Rumble - integrate into GTP SVN structure

Line 
1#ifndef NX_COLLISION_NXBOXSHAPE
2#define NX_COLLISION_NXBOXSHAPE
3/*----------------------------------------------------------------------------*\
4|
5|                                               Public Interface to NovodeX Technology
6|
7|                                                            www.novodex.com
8|
9\*----------------------------------------------------------------------------*/
10/** \addtogroup physics
11  @{
12*/
13
14#include "Nxp.h"
15#include "NxShape.h"
16
17class NxBox;
18class NxBoxShapeDesc;
19
20/**
21\brief A box shaped collision detection primitive.
22
23Each shape is owned by the actor which it is attached to.
24
25<h3>Creation</h3>
26
27An instance can be created by calling the createShape() method of the NxActor object
28that will own it, with a NxBoxShapeDesc object as the parameter, or by adding the
29shape descriptor to the NxActorDesc class before creating the actor.
30
31Example (adding shape descriptor to an NxActorDesc):
32
33\include NxBoxShape_CreateDesc.cpp
34
35Example (creating for an already existing actor):
36
37\include NxBoxShape_CreateWithActor.cpp
38
39The shape is deleted by calling NxActor::releaseShape() on the owning actor.
40
41<h3>Visualizations</h3>
42\li NX_VISUALIZE_COLLISION_AABBS
43\li NX_VISUALIZE_COLLISION_SHAPES
44\li NX_VISUALIZE_COLLISION_AXES
45
46@see NxBoxShapeDesc NxShape NxActor.createShape()
47*/
48class NxBoxShape: public NxShape
49        {
50        public:
51        /**
52        \brief Sets the box dimensions.
53
54        The dimensions are the 'radii' of the box, meaning 1/2 extents in x dimension,
55        1/2 extents in y dimension, 1/2 extents in z dimension.
56
57        <b>Sleeping:</b> Does <b>NOT</b> wake the associated actor up automatically.
58
59        \param[in] vec The new 'radii' of the box. <b>Range:</b> direction vector
60
61        <b>Platform:</b>
62        \li PC SW: Yes
63        \li PPU  : Yes
64        \li PS3  : Yes
65        \li XB360: Yes
66
67        @see NxBoxShapeDesc.dimensions getDimensions()
68        */
69        virtual void setDimensions(const NxVec3& vec) = 0;
70
71        /**
72        \brief Retrieves the dimensions of the box.
73
74        The dimensions are the 'radii' of the box, meaning 1/2 extents in x dimension,
75        1/2 extents in y dimension, 1/2 extents in z dimension.
76
77        \return The 'radii' of the box.
78
79        <b>Platform:</b>
80        \li PC SW: Yes
81        \li PPU  : Yes
82        \li PS3  : Yes
83        \li XB360: Yes
84
85        @see NxBoxShapeDesc.dimensions setDimensions()
86        */
87        virtual NxVec3 getDimensions() const = 0;
88
89        /**
90        \brief Gets the box represented as a world space OBB.
91
92        \param[out] obb The orientated bounding box in the global frame. See #NxBox.
93
94        <b>Platform:</b>
95        \li PC SW: Yes
96        \li PPU  : Yes
97        \li PS3  : Yes
98        \li XB360: Yes
99
100        @see NxBox
101        */
102        virtual void getWorldOBB(NxBox& obb) const = 0;
103
104        /**
105        \brief Saves the state of the shape object to a descriptor.
106
107        \param[out] desc Descriptor to save to.
108
109        <b>Platform:</b>
110        \li PC SW: Yes
111        \li PPU  : Yes
112        \li PS3  : Yes
113        \li XB360: Yes
114
115        @see NxBoxShapeDesc
116        */
117        virtual void saveToDesc(NxBoxShapeDesc& desc) const = 0;
118        };
119
120/** @} */
121#endif
122
123
124//AGCOPYRIGHTBEGIN
125///////////////////////////////////////////////////////////////////////////
126// Copyright © 2005 AGEIA Technologies.
127// All rights reserved. www.ageia.com
128///////////////////////////////////////////////////////////////////////////
129//AGCOPYRIGHTEND
130
Note: See TracBrowser for help on using the repository browser.