mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 23:54:35 +00:00
Engine directory for ticket #1
This commit is contained in:
parent
352279af7a
commit
7dbfe6994d
3795 changed files with 1363358 additions and 0 deletions
45
Engine/lib/opcode/OPC_Picking.h
Normal file
45
Engine/lib/opcode/OPC_Picking.h
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
* OPCODE - Optimized Collision Detection
|
||||
* Copyright (C) 2001 Pierre Terdiman
|
||||
* Homepage: http://www.codercorner.com/Opcode.htm
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* Contains code to perform "picking".
|
||||
* \file OPC_Picking.h
|
||||
* \author Pierre Terdiman
|
||||
* \date March, 20, 2001
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Include Guard
|
||||
#ifndef __OPC_PICKING_H__
|
||||
#define __OPC_PICKING_H__
|
||||
|
||||
#ifdef OPC_RAYHIT_CALLBACK
|
||||
|
||||
enum CullMode
|
||||
{
|
||||
CULLMODE_NONE = 0,
|
||||
CULLMODE_CW = 1,
|
||||
CULLMODE_CCW = 2
|
||||
};
|
||||
|
||||
typedef CullMode (*CullModeCallback)(udword triangle_index, void* user_data);
|
||||
|
||||
OPCODE_API bool SetupAllHits (RayCollider& collider, CollisionFaces& contacts);
|
||||
OPCODE_API bool SetupClosestHit (RayCollider& collider, CollisionFace& closest_contact);
|
||||
OPCODE_API bool SetupShadowFeeler (RayCollider& collider);
|
||||
OPCODE_API bool SetupInOutTest (RayCollider& collider);
|
||||
|
||||
OPCODE_API 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);
|
||||
#endif
|
||||
|
||||
#endif //__OPC_PICKING_H__
|
||||
Loading…
Add table
Add a link
Reference in a new issue