const char* create_sphere_node(const char *parent_name, const char *child_name, scalar_t resolution ) { scene_node_t *node; char *msg; msg = create_scene_node(parent_name, child_name, &node); if ( msg != NULL ) { return msg; } node->geom = Sphere; node->param.sphere.radius = 1.0; #ifdef __APPLE__ node->param.sphere.resolution = resolution; #else node->param.sphere.divisions = min( MAX_SPHERE_DIVISIONS, max( MIN_SPHERE_DIVISIONS, ROUND_TO_NEAREST( getparam_tux_sphere_divisions() * resolution ) ) ); #endif return NULL; }
void create_tranform_node(const std::string& parent_name, const std::string& child_name ) { SceneNode *node; create_scene_node(parent_name, child_name, &node); node->isSphere = false; }
const char* create_tranform_node(const char *parent_name, const char *child_name ) { scene_node_t *node; char *msg; msg = create_scene_node(parent_name, child_name, &node); if ( msg != NULL ) { return msg; } node->geom = Empty; return NULL; }
void create_sphere_node(const std::string& parent_name, const std::string& child_name, float resolution ) { SceneNode *node; create_scene_node(parent_name, child_name, &node); node->isSphere = true; node->sphere.radius = 1.0; node->sphere.divisions = MIN( MAX_SPHERE_DIVISIONS, MAX( MIN_SPHERE_DIVISIONS, ROUND_TO_NEAREST(PPConfig.getInt("tux_sphere_divisions") * resolution ) ) ); node->sphere.resolution = resolution; }