I would like to have multiple objects in an egg file, but some of them shouldn’t be rendered, because I’m using the data for intersection tests. I found this tag in the eggSyntax.txt document, but I’m having problems…
<Scalar> visibility { hidden | normal }
If the visibility of a primitive is set to "hidden", the primitive
is not generated as a normally visible primitive. If the
Config.prc variable egg-suppress-hidden is set to true, the
primitive is not converted at all; otherwise, it is converted as a
"stashed" node.
This, like the other rendering flags alpha, draw_order, and bin,
may be specified at the group level, within the primitive level,
or even within a texture.
Here is how I placed the tag in my egg file…
<Group> Cube.001 {
<Scalar> visibility { hidden }
<Tag> Intersect { }
<VertexPool> Cube.001 {
<Vertex> 0 {
1.000000 1.000000 -1.000000
}
<Vertex> 1 {
1.000000 -1.000000 -1.000000
}
but now I’m getting an error that only occurs when this tag is present.
Traceback (most recent call last):
File "IntersectionTest.py", line 140, in <module>
print i.check(fromObj,intoObj)
File "IntersectionTest.py", line 85, in check
vertices = self.getVertices(fromGeomNode)
File "IntersectionTest.py", line 58, in getVertices
for i in range(geomNode.getNumGeoms()):
AttributeError: 'libpanda.NodePath' object has no attribute 'getNumGeoms'
Am I even going about this the right way, or is there something simpler?
I thought of just using the collide tag, but I don’t want it to conflict with Panda’s collisions.