Exemplo n.º 1
0
Bool gf_sg_vrml_node_init(GF_Node *node)
{
	switch (node->sgprivate->tag) {
	case TAG_MPEG4_ColorInterpolator: 
	case TAG_X3D_ColorInterpolator:
		return InitColorInterpolator((M_ColorInterpolator *)node);
	case TAG_MPEG4_CoordinateInterpolator: 
	case TAG_X3D_CoordinateInterpolator: 
		return InitCoordinateInterpolator((M_CoordinateInterpolator *)node);
	case TAG_MPEG4_CoordinateInterpolator2D: 
		return InitCoordinateInterpolator2D((M_CoordinateInterpolator2D *)node);
	case TAG_MPEG4_NormalInterpolator: 
	case TAG_X3D_NormalInterpolator: 
		return InitNormalInterpolator((M_NormalInterpolator*)node);
	case TAG_MPEG4_OrientationInterpolator: 
	case TAG_X3D_OrientationInterpolator: 
		return InitOrientationInterpolator((M_OrientationInterpolator*)node);
	case TAG_MPEG4_PositionInterpolator: 
	case TAG_X3D_PositionInterpolator: 
		return InitPositionInterpolator((M_PositionInterpolator *)node);
	case TAG_MPEG4_PositionInterpolator2D:
	case TAG_X3D_PositionInterpolator2D:
		return InitPositionInterpolator2D((M_PositionInterpolator2D *)node);
	case TAG_MPEG4_ScalarInterpolator: 
	case TAG_X3D_ScalarInterpolator: 
		return InitScalarInterpolator((M_ScalarInterpolator *)node);
	case TAG_MPEG4_Valuator:
		return InitValuator((M_Valuator *)node);
	case TAG_MPEG4_PositionAnimator: 
		PA_Init(node); return 1;
	case TAG_MPEG4_PositionAnimator2D: 
		PA2D_Init(node); return 1;
	case TAG_MPEG4_ScalarAnimator: 
		SA_Init(node); return 1;
	case TAG_MPEG4_PositionInterpolator4D: 
		return InitPositionInterpolator4D((M_PositionInterpolator4D *)node);
	case TAG_MPEG4_CoordinateInterpolator4D: 
		return InitCoordinateInterpolator4D((M_CoordinateInterpolator4D *)node);
	case TAG_MPEG4_Script: 
	case TAG_X3D_Script: 
		return 1;

	case TAG_X3D_BooleanFilter: InitBooleanFilter(node); return 1;
	case TAG_X3D_BooleanSequencer: InitBooleanSequencer(node); return 1;
	case TAG_X3D_BooleanToggle: InitBooleanToggle(node); return 1;
	case TAG_X3D_BooleanTrigger: InitBooleanTrigger(node); return 1;
	case TAG_X3D_IntegerSequencer: InitIntegerSequencer(node); return 1;
	case TAG_X3D_IntegerTrigger: InitIntegerTrigger(node); return 1;
	case TAG_X3D_TimeTrigger: InitTimeTrigger(node); return 1;
	}
	return 0;
}
Exemplo n.º 2
0
Bool VRML_NodeInit(SFNode *node)
{
	switch (node->sgprivate->tag) {
	case TAG_MPEG4_ColorInterpolator: 
	case TAG_X3D_ColorInterpolator:
		((M_ColorInterpolator *)node)->on_set_fraction = ColorInt_SetFraction; return 1;
	case TAG_MPEG4_CoordinateInterpolator: 
	case TAG_X3D_CoordinateInterpolator: 
		((M_CoordinateInterpolator *)node)->on_set_fraction = CoordInt_SetFraction; return 1;
	case TAG_MPEG4_CoordinateInterpolator2D: 
		((M_CoordinateInterpolator2D *)node)->on_set_fraction = CI2D_SetFraction; return 1;
	case TAG_MPEG4_NormalInterpolator: 
	case TAG_X3D_NormalInterpolator: 
		((M_NormalInterpolator*)node)->on_set_fraction = NormInt_SetFraction; return 1;
	case TAG_MPEG4_OrientationInterpolator: 
	case TAG_X3D_OrientationInterpolator: 
		((M_OrientationInterpolator*)node)->on_set_fraction = OrientInt_SetFraction; return 1;
	case TAG_MPEG4_PositionInterpolator: 
	case TAG_X3D_PositionInterpolator: 
		((M_PositionInterpolator *)node)->on_set_fraction = PosInt_SetFraction; return 1;
	case TAG_MPEG4_PositionInterpolator2D:
	case TAG_X3D_PositionInterpolator2D:
		((M_PositionInterpolator2D *)node)->on_set_fraction = PosInt2D_SetFraction; return 1;
	case TAG_MPEG4_ScalarInterpolator: 
	case TAG_X3D_ScalarInterpolator: 
		((M_ScalarInterpolator *)node)->on_set_fraction = ScalarInt_SetFraction; return 1;
	case TAG_MPEG4_Valuator:
		((M_Valuator *)node)->on_inSFTime = Valuator_SetInSFTime;
		((M_Valuator *)node)->on_inSFBool = Valuator_SetInSFBool;
		((M_Valuator *)node)->on_inSFColor = Valuator_SetInSFColor;
		((M_Valuator *)node)->on_inSFInt32 = Valuator_SetInSFInt32;
		((M_Valuator *)node)->on_inSFFloat = Valuator_SetInSFFloat;
		((M_Valuator *)node)->on_inSFVec2f = Valuator_SetInSFVec2f;
		((M_Valuator *)node)->on_inSFVec3f = Valuator_SetInSFVec3f;
		((M_Valuator *)node)->on_inSFRotation = Valuator_SetInSFRotation;
		((M_Valuator *)node)->on_inSFString = Valuator_SetInSFString;
		((M_Valuator *)node)->on_inMFColor = Valuator_SetInMFColor;
		((M_Valuator *)node)->on_inMFInt32 = Valuator_SetInMFInt32;
		((M_Valuator *)node)->on_inMFFloat = Valuator_SetInMFFloat;
		((M_Valuator *)node)->on_inMFVec2f = Valuator_SetInMFVec2f;
		((M_Valuator *)node)->on_inMFVec3f = Valuator_SetInMFVec3f;
		((M_Valuator *)node)->on_inMFRotation = Valuator_SetInMFRotation;
		((M_Valuator *)node)->on_inMFString = Valuator_SetInMFString;
		return 1;
	case TAG_MPEG4_PositionAnimator: PA_Init(node); return 1;
	case TAG_MPEG4_PositionAnimator2D: PA2D_Init(node); return 1;
	case TAG_MPEG4_ScalarAnimator: SA_Init(node); return 1;
	case TAG_MPEG4_PositionInterpolator4D: ((M_PositionInterpolator4D *)node)->on_set_fraction = PI4D_SetFraction; return 1;
	case TAG_MPEG4_CoordinateInterpolator4D: ((M_CoordinateInterpolator4D *)node)->on_set_fraction = CI4D_SetFraction; return 1;
	case TAG_MPEG4_Script: return 1;
	case TAG_X3D_Script: return 1;

	case TAG_X3D_BooleanFilter: InitBooleanFilter(node); return 1;
	case TAG_X3D_BooleanSequencer: InitBooleanSequencer(node); return 1;
	case TAG_X3D_BooleanToggle: InitBooleanToggle(node); return 1;
	case TAG_X3D_BooleanTrigger: InitBooleanTrigger(node); return 1;
	case TAG_X3D_IntegerSequencer: InitIntegerSequencer(node); return 1;
	case TAG_X3D_IntegerTrigger: InitIntegerTrigger(node); return 1;
	case TAG_X3D_TimeTrigger: InitTimeTrigger(node); return 1;
	}
	return 0;
}