Example #1
0
        public NodeAttribute SetNodeAttribute(NodeAttribute pNodeAttribute)
        {
            ConnectSrcObject(pNodeAttribute);
            if (DefaultAttributeIndex.Get() < 0)
            {
                DefaultAttributeIndex.Set(nodeAttributes.IndexOf(pNodeAttribute));
            }

            return(pNodeAttribute);
        }
Example #2
0
 public NodeAttribute GetNodeAttribute()
 {
     if (DefaultAttributeIndex.Get() < 0)
     {
         return(null);
     }
     if (DefaultAttributeIndex.Get() >= nodeAttributes.Count)
     {
         return(null);
     }
     return(nodeAttributes[DefaultAttributeIndex.Get()]);
 }
Example #3
0
        public Node(string name = "")
        {
            this.Properties.AddRange(
                new Property[] {
                LclTranslation,
                LclRotation,
                LclScaling,
                Visibility,
                VisibilityInheritance,
                QuaternionInterpolate,
                RotationOffset,
                RotationPivot,
                ScalingOffset,
                ScalingPivot,
                TranslationActive,
                TranslationMin,
                TranslationMax,
                TranslationMinX,
                TranslationMinY,
                TranslationMinZ,
                TranslationMaxX,
                TranslationMaxY,
                TranslationMaxZ,
                RotationOrder,
                RotationSpaceForLimitOnly,
                RotationStiffnessX,
                RotationStiffnessY,
                RotationStiffnessZ,
                AxisLen,
                PreRotation,
                PostRotation,
                RotationActive,
                RotationMin,
                RotationMax,
                RotationMinX,
                RotationMinY,
                RotationMinZ,
                RotationMaxX,
                RotationMaxY,
                RotationMaxZ,
                InheritType,
                ScalingActive,
                ScalingMin,
                ScalingMax,
                ScalingMinX,
                ScalingMinY,
                ScalingMinZ,
                ScalingMaxX,
                ScalingMaxY,
                ScalingMaxZ,
                GeometricTranslation,
                GeometricRotation,
                GeometricScaling,
                MinDampRangeX,
                MinDampRangeY,
                MinDampRangeZ,
                MaxDampRangeX,
                MaxDampRangeY,
                MaxDampRangeZ,
                MinDampStrengthX,
                MinDampStrengthY,
                MinDampStrengthZ,
                MaxDampStrengthX,
                MaxDampStrengthY,
                MaxDampStrengthZ,
                PreferedAngleX,
                PreferedAngleY,
                PreferedAngleZ,
                LookAtProperty,
                UpVectorProperty,
                Show,
                NegativePercentShapeSupport,
                DefaultAttributeIndex,
                Freeze,
                LODBox
            });

            this.ChildNodes = SrcObjects.CreateCollectionView <Node>();
            _parentNode     = DstObjects.CreateObjectView <Node>();

            DefaultAttributeIndex.Set(-1);
            nodeAttributes = SrcObjects.CreateCollectionView <NodeAttribute>();
            Materials      = SrcObjects.CreateCollectionView <SurfaceMaterial>();
        }
Example #4
0
 public int GetDefaultNodeAttributeIndex()
 {
     return(DefaultAttributeIndex.Get());
 }