hi,
I'm trying to implement a texture plugin to retrieve primitive id. I use the following snippet but still got failed:
AColor TexColoredPrimitive::getTexColor(const VRayContext &rc) {
RayResult ray_result = rc.rayresult;
VRayExport IntersectionData intersect_data = ray_result.getIntersectionData();
VRayExport GenericPrimitive* primitive = intersect_data.getPrimitive();
int id = primitive->getIndex();
...
}
The "id" returned is always -1. How to deal with this issue ?
Thanks.
I'm trying to implement a texture plugin to retrieve primitive id. I use the following snippet but still got failed:
AColor TexColoredPrimitive::getTexColor(const VRayContext &rc) {
RayResult ray_result = rc.rayresult;
VRayExport IntersectionData intersect_data = ray_result.getIntersectionData();
VRayExport GenericPrimitive* primitive = intersect_data.getPrimitive();
int id = primitive->getIndex();
...
}
The "id" returned is always -1. How to deal with this issue ?
Thanks.
Comment