summaryrefslogtreecommitdiffhomepage
path: root/contrib/Opcode/OPC_Picking.h
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-02-09 22:23:03 +0100
committerAki <please@ignore.pl>2022-02-09 22:53:55 +0100
commit373dc625f82b47096893add42c4472e4a57ab7eb (patch)
tree640228d02476d379de13071b13d1b1fa322b767f /contrib/Opcode/OPC_Picking.h
parent2d7dd844219965b81e81848e60d7f7bf23035ee4 (diff)
downloadstarshatter-373dc625f82b47096893add42c4472e4a57ab7eb.zip
starshatter-373dc625f82b47096893add42c4472e4a57ab7eb.tar.gz
starshatter-373dc625f82b47096893add42c4472e4a57ab7eb.tar.bz2
Moved third-party libraries to a separate subdirectory
Diffstat (limited to 'contrib/Opcode/OPC_Picking.h')
-rw-r--r--contrib/Opcode/OPC_Picking.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/contrib/Opcode/OPC_Picking.h b/contrib/Opcode/OPC_Picking.h
new file mode 100644
index 0000000..cae5402
--- /dev/null
+++ b/contrib/Opcode/OPC_Picking.h
@@ -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 IcePoint& view_point, CullModeCallback callback, void* user_data);
+#endif
+
+#endif //__OPC_PICKING_H__ \ No newline at end of file