本文整理汇总了C#中Shape3D类的典型用法代码示例。如果您正苦于以下问题:C# Shape3D类的具体用法?C# Shape3D怎么用?C# Shape3D使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Shape3D类属于命名空间,在下文中一共展示了Shape3D类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: SetAppearance
private void SetAppearance(Shape3D shape, AppearanceNode appearance)
{
shape.Material.DiffuseColor = TestConvColor(((MaterialNode)appearance.material.node).diffuseColor);
shape.Material.SpecularColor = TestConvColor(((MaterialNode)appearance.material.node).specularColor);
shape.Material.AmbientIntensity = ((MaterialNode)appearance.material.node).ambientIntensity.value;
shape.Material.Shininess = ((MaterialNode)appearance.material.node).shininess.value;
shape.Material.EmmisiveColor = TestConvColor(((MaterialNode)appearance.material.node).emissiveColor);
}
开发者ID:SavchukSergey,项目名称:graph3d,代码行数:8,代码来源:VRMLToG3DConv.cs
示例2: DropToFloorAction
/// <summary>
/// Constructor
/// </summary>
/// <param name="shapes"></param>
/// <param name="mode"></param>
/// <param name="includeShapes"></param>
public DropToFloorAction(ShapeCollection shapes, Shape3D.DropToFloorMode mode, Vector3F axis, bool includeShapes)
: base("Drop to Floor")
{
_shapes = shapes;
_mode = mode;
_axis = axis;
_includeShapes = includeShapes;
}
开发者ID:hxzpily,项目名称:projectanarchy,代码行数:14,代码来源:DropToFloorAction.cs
示例3: LinkTargetConstraint
/// <summary>
/// Constructor
/// </summary>
/// <param name="ownerShape"></param>
/// <param name="primaryStringId"></param>
public LinkTargetConstraint(Shape3D ownerShape, string primaryStringId)
: base(ownerShape,"affected by",primaryStringId)
{
}
开发者ID:elemen,项目名称:projectanarchy,代码行数:9,代码来源:ParticleGroupShape.cs
示例4: DropToFloorPivotAction
public DropToFloorPivotAction(Shape3D shape, Vector3F axis, bool includeShapes)
: base(shape, Shape3D.DropToFloorMode.Pivot, axis, includeShapes)
{
}
开发者ID:hxzpily,项目名称:projectanarchy,代码行数:4,代码来源:DropToFloorAction.cs
示例5: HotSpotPlayButton
public HotSpotPlayButton(Shape3D owner, string bitmapfile, uint iColorNormal, uint iColorHigh, float fSize)
: base(owner, bitmapfile, iColorNormal, PickType.Square, fSize)
{
_iColNrml = iColorNormal;
_iColHigh = iColorHigh;
}
开发者ID:RexBaribal,项目名称:projectanarchy,代码行数:6,代码来源:FmodEditorPlugin.cs
示例6: LinkSourceHavokConstraint
/// <summary>
/// Default constructor used by the factory class
/// </summary>
/// <param name="ownerShape"></param>
/// <param name="linkName"></param>
/// <param name="primaryStringId"></param>
public LinkSourceHavokConstraint(Shape3D ownerShape, string linkName, string primaryStringId)
: base(ownerShape, linkName, primaryStringId)
{
}
开发者ID:shuaiharry,项目名称:projectanarchy,代码行数:10,代码来源:HavokConstraintLinkSource.cs
示例7: GetCustomDropToFloorAction
public override IAction GetCustomDropToFloorAction(Shape3D.DropToFloorMode mode, Vector3F axis, ShapeCollection colliderShapes)
{
if (!HasEngineInstance() || Instances.Length < 1)
return base.GetCustomDropToFloorAction(mode, axis, colliderShapes);
return new BillboardDropToFloorAction(this, null, mode, axis, colliderShapes); // all instances
}
开发者ID:elemen,项目名称:projectanarchy,代码行数:6,代码来源:BillboardGroupShape.cs
示例8: DecorationModelResource
public DecorationModelResource(Shape3D terrain, int iID)
{
_ownerTerrain = terrain;
ID = iID;
}
开发者ID:elemen,项目名称:projectanarchy,代码行数:5,代码来源:DecorationModelResource.cs
示例9: DetailTextureResource
public DetailTextureResource(Shape3D ownerTerrain, int iID)
{
_ownerTerrain = ownerTerrain;
ID = iID;
}
开发者ID:bgarrels,项目名称:projectanarchy,代码行数:5,代码来源:DetailTextureResource.cs
示例10: BidirectionalNodeLink
public BidirectionalNodeLink(Shape3D ownerShape)
: base(ownerShape,"links to", "NodeSource_1")
{
}
开发者ID:taru00,项目名称:GUIEditor,代码行数:4,代码来源:DialogShape.cs
示例11: LinkSourceVisiblity
/// <summary>
/// Default constructor used by the factory class
/// </summary>
/// <param name="ownerShape"></param>
/// <param name="linkName"></param>
/// <param name="primaryStringId"></param>
public LinkSourceVisiblity(Shape3D ownerShape, string linkName, string primaryStringId)
: base(ownerShape, linkName, primaryStringId)
{
}
开发者ID:romance-ii,项目名称:projectanarchy,代码行数:10,代码来源:VisibilityObjectShape.cs
示例12: LinkTargetVisiblity
/// <summary>
/// Constructor
/// </summary>
/// <param name="ownerShape"></param>
/// <param name="primaryStringId"></param>
public LinkTargetVisiblity(Shape3D ownerShape, string primaryStringId) : base(ownerShape,"visibility determined by",primaryStringId)
{
}
开发者ID:romance-ii,项目名称:projectanarchy,代码行数:8,代码来源:VisibilityObjectShape.cs
示例13: LinkSourceConstraint
/// <summary>
/// Constructor
/// </summary>
/// <param name="ownerShape"></param>
/// <param name="primaryStringId"></param>
public LinkSourceConstraint(Shape3D ownerShape, string primaryStringId)
: base(ownerShape,"affects",primaryStringId)
{
}
开发者ID:elemen,项目名称:projectanarchy,代码行数:9,代码来源:ConstraintShape.cs
示例14: DoDropToFloor
/// <summary>
/// Helper function
/// </summary>
/// <param name="mode"></param>
private void DoDropToFloor(Shape3D.DropToFloorMode mode, Vector3F axis)
{
Cursor = Cursors.WaitCursor;
ShapeCollection shapes = EditorApp.ActiveView.Gizmo.Shapes;
EditorManager.Actions.Add(new DropToFloorAction(shapes, mode, axis, true));
EditorManager.ActiveView.UpdateView(false);
Cursor = Cursors.Default;
}
开发者ID:elemen,项目名称:projectanarchy,代码行数:12,代码来源:EnginePanel.cs
示例15: PerformScalingTest
void PerformScalingTest(Shape3D parent)
{
Shape3D child = (Shape3D)parent.ChildCollection[0];
Vector3F pos = child.Position;
// modify scaling
parent.UniformScaling = 3.0f;
// now children should be affected as well
Assert.AreEqual(child.UniformScaling, parent.UniformScaling, "Children must be affected by scaling");
Assert.IsFalse(child.Position == pos, "Position must have changed through scaling");
}
开发者ID:elemen,项目名称:projectanarchy,代码行数:12,代码来源:ParentingTest.cs
示例16: LinkTargetPath
/// <summary>
/// Default constructor used by the factory class
/// </summary>
/// <param name="ownerShape"></param>
/// <param name="linkName"></param>
/// <param name="primaryStringId"></param>
public LinkTargetPath(Shape3D ownerShape, string linkName, string primaryStringId)
: base(ownerShape, linkName, primaryStringId)
{
this.iIndex = 0; // -1 would discard this in the entity. We don't need the index here
}
开发者ID:bgarrels,项目名称:projectanarchy,代码行数:11,代码来源:PathShape.cs
示例17: BillboardDropToFloorAction
public BillboardDropToFloorAction(BillboardGroupShape shape, BillboardInstance[] instances, Shape3D.DropToFloorMode mode, Vector3F axis, ShapeCollection colliderShapes)
{
_instances = instances;
if (_instances == null)
_instances = shape.Instances;
_shape = shape;
_mode = mode;
_oldHeights = new float[_instances.Length];
_newHeights = new float[_instances.Length];
for (int i = 0; i < _instances.Length; i++)
_oldHeights[i] = _instances[i].Z;
_shape.EngineMesh.GetDropToFloorHeights(_shape, _instances, _mode, axis, colliderShapes);
for (int i = 0; i < _instances.Length; i++)
_newHeights[i] = _instances[i].Z;
}
开发者ID:elemen,项目名称:projectanarchy,代码行数:17,代码来源:BillboardGroupShape.cs
示例18: LinkTargetGroupStaticMeshes
/// <summary>
/// Constructor
/// </summary>
/// <param name="ownerShape"></param>
/// <param name="primaryStringId"></param>
public LinkTargetGroupStaticMeshes(Shape3D ownerShape, string primaryStringId) : base(ownerShape,"visibility determined by",primaryStringId)
{
}
开发者ID:hxzpily,项目名称:projectanarchy,代码行数:8,代码来源:StaticMeshGroupShape.cs
示例19: LinkSourceGroupStaticMeshes
/// <summary>
/// Constructor
/// </summary>
/// <param name="ownerShape"></param>
/// <param name="primaryStringId"></param>
public LinkSourceGroupStaticMeshes(Shape3D ownerShape, string primaryStringId) : base(ownerShape,"affects",primaryStringId)
{
}
开发者ID:hxzpily,项目名称:projectanarchy,代码行数:8,代码来源:StaticMeshGroupShape.cs
示例20: CreateShapeLink
public override ShapeLink CreateShapeLink(string classname, Shape3D ownerShape, string name, string primaryID)
{
Type t = _cachedClassTypes.ContainsKey(classname) ? _cachedClassTypes[classname] : null;
if (t == null)
{
// loop through all assemblies and find the type by name
Assembly[] assemblies = AssemblyHelper.GetEditorAssemblies();
foreach (Assembly assembly in assemblies)
{
Type[] types = null;
try
{
types = assembly.GetTypes();
}
catch (Exception ex)
{
EditorManager.IgnoreException(ex);
}
if (types == null)
continue;
foreach (Type type in types)
if (type.Name == classname && type.IsSubclassOf(typeof(ShapeLink)))
{
t = type;
break;
}
if (t != null)
break;
}
_cachedClassTypes[classname] = t; // can be null, which is also cached
}
if (t == null)
{
if (ThrowExceptions)
throw new Exception("Unknown shape class '" + classname + "'");
return null;
}
string moreFailInfo = "";
try
{
object[] args = new object[3] { ownerShape, name, primaryID }; // always use this constructor
ShapeLink newObject = Activator.CreateInstance(t, args) as ShapeLink;
if (newObject == null)
{
if (ThrowExceptions)
throw new Exception("Failed to create instance of class '" + classname + "'");
return null;
}
return newObject;
}
catch (Exception ex)
{
EditorManager.DumpException(ex, false);
moreFailInfo = "\nDetailed: ";
if (ex.InnerException != null)
moreFailInfo += ex.InnerException.ToString();
else
moreFailInfo += ex.Message;
}
if (ThrowExceptions)
throw new Exception("Failed to create instance of class '" + classname + "'" + moreFailInfo);
return null;
}
开发者ID:RexBaribal,项目名称:projectanarchy,代码行数:67,代码来源:VForgeShapeFactory.cs
注:本文中的Shape3D类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论