Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Susano Pinto <andresusanopinto@gmail.com>2009-09-25 02:55:57 +0400
committerAndre Susano Pinto <andresusanopinto@gmail.com>2009-09-25 02:55:57 +0400
commit1305715d2d84f67027b870f263cef3a7f009c056 (patch)
tree50076f8e30adb6f12735fc486abfa11e138511ec /source/blender/render/intern/include/rayobject.h
parentd3e88cb3e0d4117ab845a7c77254a5ab05ce1657 (diff)
*Added VlakPrimitive (this rayobject rimitive only stores ObjectRenderInstance and VlakRen pointers)
- it difers from RayFace that localy stored the vertex coordinates. - basicaly this reduces memory usage
Diffstat (limited to 'source/blender/render/intern/include/rayobject.h')
-rw-r--r--source/blender/render/intern/include/rayobject.h27
1 files changed, 9 insertions, 18 deletions
diff --git a/source/blender/render/intern/include/rayobject.h b/source/blender/render/intern/include/rayobject.h
index dbd68fe8b8b..337f9ca3fdd 100644
--- a/source/blender/render/intern/include/rayobject.h
+++ b/source/blender/render/intern/include/rayobject.h
@@ -57,17 +57,18 @@ extern "C" {
In order to allow a mixture of RayFace+RayObjects,
all RayObjects must be 4byte aligned, allowing us to use the
- 2 least significant bits (with the mask 0x02) to define the
+ 2 least significant bits (with the mask 0x03) to define the
type of RayObject.
- This leads to 4 possible types of RayObject, but at the moment
- only 2 are used:
+ This leads to 4 possible types of RayObject:
- addr&2 - type of object
+ addr&3 - type of object
0 Self (reserved for each structure)
- 1 RayFace
+ 1 RayFace (tri/quad primitive)
2 RayObject (generic with API callbacks)
- 3 RayObject_Vlak
+ 3 VlakPrimitive
+ (vlak primitive - to be used when we have a vlak describing the data
+ eg.: on render code)
0 means it's reserved and has it own meaning inside each ray acceleration structure
(this way each structure can use the allign offset to determine if a node represents a
@@ -83,26 +84,16 @@ extern "C" {
/* used to unalign a given ray object */
#define RE_rayobject_unalignRayFace(o) ((RayObject*)(((intptr_t)o)|1))
#define RE_rayobject_unalignRayAPI(o) ((RayObject*)(((intptr_t)o)|2))
-#define RE_rayobject_unalignRayVlak(o) ((RayObject*)(((intptr_t)o)|3))
+#define RE_rayobject_unalignVlakPrimitive(o) ((RayObject*)(((intptr_t)o)|3))
/* used to test the type of ray object */
#define RE_rayobject_isAligned(o) ((((intptr_t)o)&3) == 0)
#define RE_rayobject_isRayFace(o) ((((intptr_t)o)&3) == 1)
#define RE_rayobject_isRayAPI(o) ((((intptr_t)o)&3) == 2)
-#define RE_rayobject_isRayVlak(o) ((((intptr_t)o)&3) == 3)
+#define RE_rayobject_isVlakPrimitive(o) ((((intptr_t)o)&3) == 3)
/*
- * This ray object represents faces directly from a given VlakRen structure.
- * Thus allowing to save memory, but making code dependant on render structures
-typedef struct RayVlak
-{
- struct ObjectInstanceRen *ob;
- struct VlakRen *face;
-} RayVlak;
- */
-
-/*
* This rayobject represents a generic object. With it's own callbacks for raytrace operations.
* It's suitable to implement things like LOD.
*/