public FbxGeometry GetSourceGeometry() { global::System.IntPtr cPtr = FbxWrapperNativePINVOKE.FbxGeometryWeightedMap_GetSourceGeometry(swigCPtr); FbxGeometry ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxGeometry(cPtr, false); return(ret); }
public FbxGeometry GetGeometry(int pIndex) { global::System.IntPtr cPtr = FbxWrapperNativePINVOKE.FbxScene_GetGeometry(swigCPtr, pIndex); FbxGeometry ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxGeometry(cPtr, false); return(ret); }
public FbxGeometry GetGeometry() { global::System.IntPtr cPtr = fbx_wrapperPINVOKE.FbxSkin_GetGeometry(swigCPtr); FbxGeometry ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxGeometry(cPtr, false); return(ret); }
public new static FbxGeometry Create(FbxManager pManager, string pName) { global::System.IntPtr cPtr = FbxWrapperNativePINVOKE.FbxGeometry_Create__SWIG_0(FbxManager.getCPtr(pManager), pName); FbxGeometry ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxGeometry(cPtr, false); return(ret); }
public FbxGeometry GetGeometry() { global::System.IntPtr cPtr = FbxWrapperNativePINVOKE.FbxBlendShape_GetGeometry(swigCPtr); FbxGeometry ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxGeometry(cPtr, false); return(ret); }
public FbxGeometry GetDestinationGeometry() { global::System.IntPtr cPtr = fbx_wrapperPINVOKE.FbxGeometryWeightedMap_GetDestinationGeometry(swigCPtr); FbxGeometry ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxGeometry(cPtr, false); return(ret); }
public new static FbxGeometry Create(FbxObject pContainer, string pName) { global::System.IntPtr cPtr = fbx_wrapperPINVOKE.FbxGeometry_Create__SWIG_1(FbxObject.getCPtr(pContainer), pName); FbxGeometry ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxGeometry(cPtr, false); return(ret); }
public bool Equals(FbxGeometry other) { if (object.ReferenceEquals(other, null)) { return(false); } return(this.swigCPtr.Handle.Equals(other.swigCPtr.Handle)); }
public bool SetGeometry(FbxGeometry pGeometry) { bool ret = NativeMethods.FbxBlendShape_SetGeometry(swigCPtr, FbxGeometry.getCPtr(pGeometry)); if (NativeMethods.SWIGPendingException.Pending) { throw NativeMethods.SWIGPendingException.Retrieve(); } return(ret); }
public new static FbxGeometry Create(FbxObject pContainer, string pName) { global::System.IntPtr cPtr = NativeMethods.FbxGeometry_Create__SWIG_1(FbxObject.getCPtr(pContainer), pName); FbxGeometry ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxGeometry(cPtr, false); if (NativeMethods.SWIGPendingException.Pending) { throw NativeMethods.SWIGPendingException.Retrieve(); } return(ret); }
public FbxGeometry GetGeometry() { global::System.IntPtr cPtr = NativeMethods.FbxNode_GetGeometry(swigCPtr); FbxGeometry ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxGeometry(cPtr, false); if (NativeMethods.SWIGPendingException.Pending) { throw NativeMethods.SWIGPendingException.Retrieve(); } return(ret); }
public void TestBasics() { using (var fbxBlendShape = CreateObject()) { // test FbxDeformer functions TestBasics(fbxBlendShape, FbxDeformer.EDeformerType.eBlendShape); int origCount = fbxBlendShape.GetBlendShapeChannelCount(); // test AddBlendShapeChannel() var fbxBlendShapeChannel = FbxBlendShapeChannel.Create(Manager, "blendShapeChannel"); fbxBlendShape.AddBlendShapeChannel(fbxBlendShapeChannel); Assert.AreEqual(origCount + 1, fbxBlendShape.GetBlendShapeChannelCount()); Assert.AreEqual(fbxBlendShapeChannel, fbxBlendShape.GetBlendShapeChannel(origCount)); // test RemoveBlendShapeChannel() Assert.AreEqual(fbxBlendShapeChannel, fbxBlendShape.RemoveBlendShapeChannel(fbxBlendShapeChannel)); // test already removed Assert.AreEqual(null, fbxBlendShape.RemoveBlendShapeChannel(fbxBlendShapeChannel)); // test null Assert.That(() => { fbxBlendShape.AddBlendShapeChannel(null); }, Throws.Exception.TypeOf <System.ArgumentNullException>()); Assert.That(() => { fbxBlendShape.RemoveBlendShapeChannel(null); }, Throws.Exception.TypeOf <System.ArgumentNullException>()); // test destroyed fbxBlendShapeChannel.Destroy(); Assert.That(() => { fbxBlendShape.AddBlendShapeChannel(fbxBlendShapeChannel); }, Throws.Exception.TypeOf <System.ArgumentNullException>()); Assert.That(() => { fbxBlendShape.RemoveBlendShapeChannel(fbxBlendShapeChannel); }, Throws.Exception.TypeOf <System.ArgumentNullException>()); // test SetGeometry() FbxGeometry fbxGeom = FbxGeometry.Create(Manager, "geometry"); Assert.IsTrue(fbxBlendShape.SetGeometry(fbxGeom)); Assert.AreEqual(fbxGeom, fbxBlendShape.GetGeometry()); // test null Assert.That(() => { fbxBlendShape.SetGeometry(null); }, Throws.Exception.TypeOf <System.ArgumentNullException>()); // test destroyed fbxGeom = FbxGeometry.Create(Manager, "geometry2"); fbxGeom.Destroy(); Assert.That(() => { fbxBlendShape.SetGeometry(fbxGeom); }, Throws.Exception.TypeOf <System.ArgumentNullException>()); } }
public bool SetGeometry(FbxGeometry pGeometry) { bool ret = FbxWrapperNativePINVOKE.FbxBlendShape_SetGeometry(swigCPtr, FbxGeometry.getCPtr(pGeometry)); return(ret); }
public bool SetGeometry(FbxGeometry pGeometry) { bool ret = fbx_wrapperPINVOKE.FbxSkin_SetGeometry(swigCPtr, FbxGeometry.getCPtr(pGeometry)); return(ret); }
public bool AddGeometry(FbxGeometry pGeometry) { bool ret = fbx_wrapperPINVOKE.FbxScene_AddGeometry(swigCPtr, FbxGeometry.getCPtr(pGeometry)); return(ret); }
public bool ComputeGeometryControlPointsWeightedMapping(FbxGeometry pSrcGeom, FbxGeometry pDstGeom, FbxWeightedMapping pSrcToDstWeightedMapping) { bool ret = FbxWrapperNativePINVOKE.FbxGeometryConverter_ComputeGeometryControlPointsWeightedMapping__SWIG_1(swigCPtr, FbxGeometry.getCPtr(pSrcGeom), FbxGeometry.getCPtr(pDstGeom), FbxWeightedMapping.getCPtr(pSrcToDstWeightedMapping)); return(ret); }
/// <summary> /// /// </summary> /// <param name="geometry"></param> /// <param name="Index"></param> /// <returns></returns> private static IOVertex CreateVertex(Matrix4 transform, FbxGeometry geometry, int Index, Vector4[] boneIndices, Vector4[] boneWeights, float scale) { int VertexIndex = geometry.Indices[Index]; if ((Index + 1) % 3 == 0) { VertexIndex = (geometry.Indices[Index] + 1) * -1; } IOVertex vertex = new IOVertex() { Position = Vector3.TransformPosition( new Vector3( (float)geometry.Vertices[VertexIndex * 3], (float)geometry.Vertices[VertexIndex * 3 + 1], (float)geometry.Vertices[VertexIndex * 3 + 2]), transform) * scale, BoneIndices = boneIndices[VertexIndex], BoneWeights = boneWeights[VertexIndex] }; vertex.Color = Vector4.One; //Deforming foreach (var layer in geometry.Layers) { int layerIndex = Index; if (!layer.ReferenceInformationType.Equals("Direct")) { layerIndex = layer.Indices[Index]; } switch (layer.Name) { case "LayerElementNormal": if (layer.Data.Length == geometry.Vertices.Length) { vertex.Normal = new Vector3((float)layer.Data[VertexIndex * 3], (float)layer.Data[VertexIndex * 3 + 1], (float)layer.Data[VertexIndex * 3 + 2]); vertex.Normal = Vector3.TransformNormal(vertex.Normal, transform); vertex.Normal.Normalize(); break; } else { vertex.Normal = new Vector3((float)layer.Data[layerIndex * 3], (float)layer.Data[layerIndex * 3 + 1], (float)layer.Data[layerIndex * 3 + 2]); vertex.Normal = Vector3.TransformNormal(vertex.Normal, transform); vertex.Normal.Normalize(); break; } case "LayerElementColor": vertex.Color = new Vector4((float)layer.Data[layerIndex * 4], (float)layer.Data[layerIndex * 4 + 1], (float)layer.Data[layerIndex * 4 + 2], (float)layer.Data[layerIndex * 4 + 3]); break; case "LayerElementUV": Vector2 uv = new Vector2((float)layer.Data[layerIndex * 2], 1 - (float)layer.Data[layerIndex * 2 + 1]); if (layer.Layer == 0) { vertex.UV0 = uv; } if (layer.Layer == 1) { vertex.UV1 = uv; } if (layer.Layer == 2) { vertex.UV2 = uv; } if (layer.Layer == 3) { vertex.UV3 = uv; } break; } } return(vertex); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FbxGeometry obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }
public bool RemoveGeometry(FbxGeometry pGeometry) { bool ret = FbxWrapperNativePINVOKE.FbxScene_RemoveGeometry(swigCPtr, FbxGeometry.getCPtr(pGeometry)); return(ret); }
public bool ComputeGeometryControlPointsWeightedMapping(FbxGeometry pSrcGeom, FbxGeometry pDstGeom, FbxWeightedMapping pSrcToDstWeightedMapping, bool pSwapUV) { bool ret = fbx_wrapperPINVOKE.FbxGeometryConverter_ComputeGeometryControlPointsWeightedMapping__SWIG_0(swigCPtr, FbxGeometry.getCPtr(pSrcGeom), FbxGeometry.getCPtr(pDstGeom), FbxWeightedMapping.getCPtr(pSrcToDstWeightedMapping), pSwapUV); return ret; }