Exemplo n.º 1
0
        public static Node WithLocalTransform(this Node node, Transforms.AffineTransform xform)
        {
            Guard.NotNull(node, nameof(node));

            node.LocalTransform = xform;
            return(node);
        }
Exemplo n.º 2
0
        public InstanceBuilder AddRigidMesh(MESHBUILDER mesh, Transforms.AffineTransform meshWorldTransform)
        {
            Guard.NotNull(mesh, nameof(mesh));

            var instance = new InstanceBuilder(this);

            instance.Content = new FixedTransformer(mesh, meshWorldTransform);

            _Instances.Add(instance);

            return(instance);
        }
Exemplo n.º 3
0
        public InstanceBuilder AddRigidMesh(MESHBUILDER mesh, NodeBuilder node, Transforms.AffineTransform instanceTransform)
        {
            Guard.NotNull(mesh, nameof(mesh));
            Guard.NotNull(node, nameof(node));

            if (instanceTransform.IsIdentity)
            {
                return(AddRigidMesh(mesh, node));
            }

            var instance = new InstanceBuilder(this);

            instance.Content = new FixedTransformer(mesh, node, instanceTransform);

            _Instances.Add(instance);

            return(instance);
        }
Exemplo n.º 4
0
 internal FixedTransformer(Object content, NodeBuilder parentNode, Transforms.AffineTransform childTransform)
     : base(content)
 {
     _ParentNode     = parentNode;
     _ChildTransform = childTransform;
 }
Exemplo n.º 5
0
 internal FixedTransformer(Object content, Transforms.AffineTransform transform)
     : base(content)
 {
     _ChildTransform = transform;
 }