Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
Typedefs | |
typedef void(* | RequestCallback )(udword triangle_index, VertexPointers &triangle, void *user_data) |
typedef void(* | CullingCallback )(udword nb_primitives, udword *node_primitives, BOOL need_clipping, void *user_data) |
typedef bool(* | WalkingCallback )(const AABBTreeNode *current, udword depth, void *user_data) |
typedef bool(* | GenericWalkingCallback )(const void *current, void *user_data) |
typedef void(* | HitCallback )(const CollisionFace &hit, void *user_data) |
typedef CullMode(* | CullModeCallback )(udword triangle_index, void *user_data) |
typedef BOOL(* | PairCallback )(udword id0, udword id1, void *user_data) |
Enumerations | |
enum | PointComponent { _X = 0, _Y = 1, _Z = 2, _W = 3, _FORCE_DWORD = 0x7fffffff } |
enum | AxisOrder { AXES_XYZ = (_X)|(_Y<<2)|(_Z<<4), AXES_XZY = (_X)|(_Z<<2)|(_Y<<4), AXES_YXZ = (_Y)|(_X<<2)|(_Z<<4), AXES_YZX = (_Y)|(_Z<<2)|(_X<<4), AXES_ZXY = (_Z)|(_X<<2)|(_Y<<4), AXES_ZYX = (_Z)|(_Y<<2)|(_X<<4), AXES_FORCE_DWORD = 0x7fffffff } |
enum | PartVal { TRI_MINUS_SPACE = 0, TRI_PLUS_SPACE = 1, TRI_INTERSECT = 2, TRI_ON_PLANE = 3, TRI_FORCEDWORD = 0x7fffffff } |
enum | AABBType { AABB_RENDER = 0, AABB_UPDATE = 1, AABB_FORCE_DWORD = 0x7fffffff } |
enum | BSphereMethod { BS_NONE, BS_GEMS, BS_MINIBALL, BS_FORCE_DWORD = 0x7fffffff } |
enum | SplittingRules { SPLIT_LARGEST_AXIS = (1<<0), SPLIT_SPLATTER_POINTS = (1<<1), SPLIT_BEST_AXIS = (1<<2), SPLIT_BALANCED = (1<<3), SPLIT_FIFTY = (1<<4), SPLIT_GEOM_CENTER = (1<<5), SPLIT_FORCE_DWORD = 0x7fffffff } |
Tree splitting rules. More... | |
enum | ModelFlag { OPC_QUANTIZED = (1<<0), OPC_NO_LEAF = (1<<1), OPC_SINGLE_NODE = (1<<2) } |
enum | CollisionFlag { OPC_FIRST_CONTACT = (1<<0), OPC_TEMPORAL_COHERENCE = (1<<1), OPC_CONTACT = (1<<2), OPC_TEMPORAL_HIT = (1<<3), OPC_NO_PRIMITIVE_TESTS = (1<<4), OPC_CONTACT_FOUND = OPC_FIRST_CONTACT | OPC_CONTACT, OPC_TEMPORAL_CONTACT = OPC_TEMPORAL_HIT | OPC_CONTACT, OPC_FORCE_DWORD = 0x7fffffff } |
enum | CullMode { CULLMODE_NONE = 0, CULLMODE_CW = 1, CULLMODE_CCW = 2 } |
Functions | |
inline_ void | OPComputeMinMax (Point &min, Point &max, const VertexPointers &vp) |
bool | SetupAllHits (RayCollider &collider, CollisionFaces &contacts) |
bool | SetupClosestHit (RayCollider &collider, CollisionFace &closest_contact) |
bool | SetupShadowFeeler (RayCollider &collider) |
bool | SetupInOutTest (RayCollider &collider) |
bool | Picking (CollisionFace &picked_face, const Ray &world_ray, const Model &model, const Matrix4x4 *world, float min_dist, float max_dist, const Point &view_point, CullModeCallback callback, void *user_data) |
FUNCTION ICEMATHS_API void | Normalize1 (Point &a) |
FUNCTION ICEMATHS_API void | Normalize2 (Point &a) |
inline_ void | TransformPoint4x3 (Point &dest, const Point &source, const Matrix4x4 &rot) |
Quickly rotates & translates a vector, using the 4x3 part of a 4x4 matrix. More... | |
inline_ void | TransformPoint3x3 (Point &dest, const Point &source, const Matrix4x4 &rot) |
Quickly rotates a vector, using the 3x3 part of a 4x4 matrix. More... | |
void | InvertPRMatrix (Matrix4x4 &dest, const Matrix4x4 &src) |
inline_ void | TransformPlane (Plane &transformed, const Plane &plane, const Matrix4x4 &transform) |
inline_ void | TransformPlane (Plane &plane, const Matrix4x4 &transform) |
inline_ void | ComputeReflexionVector (Point &reflected, const Point &incoming_dir, const Point &outward_normal) |
inline_ void | ComputeReflexionVector (Point &reflected, const Point &source, const Point &impact, const Point &normal) |
inline_ void | DecomposeVector (Point &normal_compo, Point &tangent_compo, const Point &outward_dir, const Point &outward_normal) |
inline_ void | ComputeLocalDirection (Point &local_dir, const Point &world_dir, const Matrix4x4 &world) |
inline_ void | ComputeLocalPoint (Point &local_pt, const Point &world_pt, const Matrix4x4 &world) |
inline_ void | ComputeLocalRay (Ray &local_ray, const Ray &world_ray, const Matrix4x4 &world) |
inline_ void | ComputeMinMax (const Point &p, Point &min, Point &max) |
inline_ void | ComputeAABB (AABB &aabb, const Point *list, udword nb_pts) |
inline_ void | TransformPoint (Point &dest, const Point &source, const Matrix3x3 &rot, const Point &trans) |
Quickly rotates & translates a vector. More... | |
FUNCTION OPCODE_API bool | CompleteBoxPruning (udword nb, const AABB **array, Pairs &pairs, const Axes &axes) |
FUNCTION OPCODE_API bool | BipartiteBoxPruning (udword nb0, const AABB **array0, udword nb1, const AABB **array1, Pairs &pairs, const Axes &axes) |
FUNCTION OPCODE_API bool | BruteForceCompleteBoxTest (udword nb, const AABB **array, Pairs &pairs) |
FUNCTION OPCODE_API bool | BruteForceBipartiteBoxTest (udword nb0, const AABB **array0, udword nb1, const AABB **array1, Pairs &pairs) |
Variables | |
const float | EPSILON2 = 1.0e-20f |
typedef bool(* Opcode::GenericWalkingCallback)(const void *current, void *user_data) |
typedef void(* Opcode::HitCallback)(const CollisionFace &hit, void *user_data) |
typedef void(* Opcode::RequestCallback)(udword triangle_index, VertexPointers &triangle, void *user_data) |
User-callback, called by OPCODE to request vertices from the app.
triangle_index | [in] face index for which the system is requesting the vertices |
triangle | [out] triangle's vertices (must be provided by the user) |
user_data | [in] user-defined data from SetCallback() |
typedef bool(* Opcode::WalkingCallback)(const AABBTreeNode *current, udword depth, void *user_data) |
enum Opcode::AABBType |
enum Opcode::AxisOrder |
enum Opcode::CullMode |
enum Opcode::ModelFlag |
enum Opcode::PartVal |
Tree splitting rules.
bool Opcode::BipartiteBoxPruning | ( | udword | nb0, |
const AABB ** | array0, | ||
udword | nb1, | ||
const AABB ** | array1, | ||
Pairs & | pairs, | ||
const Axes & | axes | ||
) |
Bipartite box pruning. Returns a list of overlapping pairs of boxes, each box of the pair belongs to a different set.
nb0 | [in] number of boxes in the first set |
array0 | [in] array of boxes for the first set |
nb1 | [in] number of boxes in the second set |
array1 | [in] array of boxes for the second set |
pairs | [out] array of overlapping pairs |
axes | [in] projection order (0,2,1 is often best) |
Definition at line 95 of file OPC_BoxPruning.cpp.
bool Opcode::BruteForceBipartiteBoxTest | ( | udword | nb0, |
const AABB ** | array0, | ||
udword | nb1, | ||
const AABB ** | array1, | ||
Pairs & | pairs | ||
) |
Brute-force bipartite box pruning. Returns a list of overlapping pairs of boxes, each box of the pair belongs to a different set.
nb0 | [in] number of boxes in the first set |
array0 | [in] array of boxes for the first set |
nb1 | [in] number of boxes in the second set |
array1 | [in] array of boxes for the second set |
pairs | [out] array of overlapping pairs |
Definition at line 330 of file OPC_BoxPruning.cpp.
Complete box pruning. Returns a list of overlapping pairs of boxes, each box of the pair belongs to the same set.
nb | [in] number of boxes |
array | [in] array of boxes |
pairs | [out] array of overlapping pairs |
Definition at line 355 of file OPC_BoxPruning.cpp.
bool Opcode::CompleteBoxPruning | ( | udword | nb, |
const AABB ** | array, | ||
Pairs & | pairs, | ||
const Axes & | axes | ||
) |
Complete box pruning. Returns a list of overlapping pairs of boxes, each box of the pair belongs to the same set.
nb | [in] number of boxes |
array | [in] array of boxes |
pairs | [out] array of overlapping pairs |
axes | [in] projection order (0,2,1 is often best) |
Definition at line 190 of file OPC_BoxPruning.cpp.
Referenced by Opcode::SweepAndPrune::Init().
Definition at line 56 of file IceMatrix4x4.cpp.
References Opcode::Matrix4x4::m.
Referenced by Picking().
FUNCTION ICEMATHS_API void Opcode::Normalize1 | ( | Point & | a) |
FUNCTION ICEMATHS_API void Opcode::Normalize2 | ( | Point & | a) |
inline_ void Opcode::OPComputeMinMax | ( | Point & | min, |
Point & | max, | ||
const VertexPointers & | vp | ||
) |
Definition at line 314 of file OPC_HybridModel.cpp.
References Opcode::Point::Max(), Opcode::Point::Min(), Opcode::VertexPointers::Vertex, Opcode::Point::x, Opcode::Point::y, and Opcode::Point::z.
OPCODE_API bool Opcode::Picking | ( | CollisionFace & | picked_face, |
const Ray & | world_ray, | ||
const Model & | model, | ||
const Matrix4x4 * | world, | ||
float | min_dist, | ||
float | max_dist, | ||
const Point & | view_point, | ||
CullModeCallback | callback, | ||
void * | user_data | ||
) |
Definition at line 87 of file OPC_Picking.cpp.
References Opcode::VertexPointers::BackfaceCulling(), Opcode::RayCollider::Collide(), CULLMODE_CCW, CULLMODE_CW, CULLMODE_NONE, Opcode::BaseModel::GetMeshInterface(), INVALID_ID, InvertPRMatrix(), MAX_FLOAT, Opcode::CollisionFace::mDistance, Opcode::CollisionFace::mFaceID, Opcode::CollisionFace::mU, Opcode::CollisionFace::mV, Opcode::RayCollider::SetCulling(), Opcode::Collider::SetFirstContact(), Opcode::RayCollider::SetHitCallback(), Opcode::RayCollider::SetMaxDist(), Opcode::Collider::SetTemporalCoherence(), and Opcode::RayCollider::SetUserData().
OPCODE_API bool Opcode::SetupAllHits | ( | RayCollider & | collider, |
CollisionFaces & | contacts | ||
) |
Definition at line 37 of file OPC_Picking.cpp.
References Opcode::CollisionFaces::AddFace(), Opcode::Collider::SetFirstContact(), Opcode::RayCollider::SetHitCallback(), and Opcode::RayCollider::SetUserData().
OPCODE_API bool Opcode::SetupClosestHit | ( | RayCollider & | collider, |
CollisionFace & | closest_contact | ||
) |
Definition at line 54 of file OPC_Picking.cpp.
References MAX_FLOAT, Opcode::CollisionFace::mDistance, Opcode::Collider::SetFirstContact(), Opcode::RayCollider::SetHitCallback(), and Opcode::RayCollider::SetUserData().
OPCODE_API bool Opcode::SetupInOutTest | ( | RayCollider & | collider) |
Definition at line 79 of file OPC_Picking.cpp.
References null, Opcode::Collider::SetFirstContact(), and Opcode::RayCollider::SetHitCallback().
OPCODE_API bool Opcode::SetupShadowFeeler | ( | RayCollider & | collider) |
Definition at line 72 of file OPC_Picking.cpp.
References null, Opcode::Collider::SetFirstContact(), and Opcode::RayCollider::SetHitCallback().