GFX
  • Docs
  • API
Search Results for

    Show / Hide Table of Contents
    • Genesis.Core
      • AssetManager
      • Game
      • GameElement
      • GameEventHandler
      • GenesisWindow
      • IGameBehavior
      • Input
      • Layer
      • Light
      • Scene
      • Scene3D
      • SceneEventHandler
      • SceneSizeEvenHandler
      • Storage
      • Utils
    • Genesis.Core.Behaviors
      • AnimationBehavior
      • CameraFlags
      • CharacterController2D
      • ControllerPreset
      • MoveDirection
      • MovementFlags
      • SpriteMovementController
    • Genesis.Core.Behaviors.Physics2D
      • BufferedSpriteCollider
      • PhysicsBox2D
      • PhysicsPolygon2D
      • Rigidbody2D
    • Genesis.Core.Behaviors.Physics3D
      • BoxCollider
      • CapsuleCollider
      • ConvexHullBehavior
      • QubeConvexHull
      • SphereCollider
      • StaticMeshBehavior
    • Genesis.Core.Behaviors._3D
      • Stance
      • ThirdpersonCharacterController
    • Genesis.Core.GameElements
      • BufferedSprite
      • CameraElement
      • Element3D
      • Empty
      • Model
      • ParticleBuffers
      • ParticleDeffinition
      • ParticleEmitter
      • Qube
      • RectElement
      • Skybox
      • Sprite
      • SpriteShapeDeffinition
      • Terrain2D
      • Terrain3D
      • TerrainData
    • Genesis.Graphics
      • Animation
      • Camera
      • CameraType
      • Face
      • Font
      • Framebuffer
      • Glyphe
      • IRenderDevice
      • Material
      • MaterialBuffer
      • Mesh
      • PerspectiveCamera
      • Shader
      • ShaderProgram
      • TexCoords
      • Texture
      • Viewport
    • Genesis.Graphics.Animation3D
      • Animation
      • Animator
      • AssimpNodeData
      • Bone
      • KeyPosition
      • KeyRotation
      • KeyScale
      • ModelMesh
      • boneinfo
      • vertex
    • Genesis.Graphics.Physics
      • BulletDebugRenderer
    • Genesis.Graphics.RenderDevice
      • ClassicGL
      • GLRenderer
    • Genesis.Graphics.Shaders.OpenGL
      • AnimatedModelShader
      • BasicShader
      • DiffuseLightning
      • DiffuseNormalLightning
      • DiffuseNormalShader
      • DiffuseShader
      • DiffuseSolidShader
      • MVPRectShader
      • MVPShader
      • MVPSolidShader
      • ParticleShader
      • ScreenShader
      • SkyboxShader
      • SpriteShader
      • TerrainShader
      • WireframeShader
    • Genesis.Graphics.Shapes
      • BufferedSpriteShape
      • FrameShape
      • GlypheShape
      • LineShape
      • PlaneShape
      • QubeShape
      • RectShape
      • Shape
      • SpriteShape
    • Genesis.Math
      • Matrix4x4
      • NoisePoint
      • PerlinNoise
      • Rect
      • Vec3
    • Genesis.Physics
      • Aabb
      • HitResult
      • MatrixSet
      • MouseRay2
      • PhysicHandler
      • PhysicHandlerEvent
      • PhysicPropeterys
      • PhysicsBehavior
      • PhysicsBehaviorEvent
      • PhysicsHandler2D
      • PhysicsHandler3D
      • Raycast
    • Genesis.UI
      • Canvas
      • ImageButton
      • Label
      • ListItem
      • ListItemBehavior
      • ListSelector
      • ListSelectorBehavior
      • Panel
      • ProgressBar
      • UIEvent
      • UIParseHandler
      • UIParser
      • Widget

    Class StaticMeshBehavior

    Represents a Physics behavior for a static mesh in 3D.

    Inheritance
    object
    IGameBehavior
    PhysicsBehavior
    StaticMeshBehavior
    Inherited Members
    PhysicsBehavior.OnCollide
    IGameBehavior.Parent
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Genesis.Core.Behaviors.Physics3D
    Assembly: Genesis.dll
    Syntax
    public class StaticMeshBehavior : PhysicsBehavior

    Constructors

    StaticMeshBehavior()

    Declaration
    public StaticMeshBehavior()

    Properties

    RigidBody

    Gets or sets the RigidBody associated with this behavior.

    Declaration
    public RigidBody RigidBody { get; set; }
    Property Value
    Type Description
    RigidBody

    Methods

    Collide(Scene, Game, RigidBody)

    Handles collision events for the StaticMeshBehavior.

    Declaration
    public override void Collide(Scene scene, Game game, RigidBody collisionObject)
    Parameters
    Type Name Description
    Scene scene
    Game game
    RigidBody collisionObject
    Overrides
    PhysicsBehavior.Collide(Scene, Game, RigidBody)

    CreateRigidBody(PhysicHandler, float, Mesh)

    Creates the RigidBody for the StaticMeshBehavior.

    Declaration
    public void CreateRigidBody(PhysicHandler handler, float mass, Mesh mesh)
    Parameters
    Type Name Description
    PhysicHandler handler

    Physics handler responsible for managing elements.

    float mass

    Mass of the rigid body.

    Mesh mesh

    Mesh data for creating the collision shape.

    Exceptions
    Type Condition
    InvalidOperationException

    Thrown when the parent element is not of type Element3D.

    GetPhysicsObject()

    Returns the physics object.

    Declaration
    public override object GetPhysicsObject()
    Returns
    Type Description
    object
    Overrides
    PhysicsBehavior.GetPhysicsObject()

    GetPhysicsObject<T>()

    Returns the physics object with the specified type.

    Declaration
    public override T GetPhysicsObject<T>()
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    Overrides
    PhysicsBehavior.GetPhysicsObject<T>()

    OnDestroy(Game, GameElement)

    Destroys the behavior.

    Declaration
    public override void OnDestroy(Game game, GameElement parent)
    Parameters
    Type Name Description
    Game game
    GameElement parent
    Overrides
    IGameBehavior.OnDestroy(Game, GameElement)

    OnInit(Game, GameElement)

    Checks on init if the parent type is an Element3D.

    Declaration
    public override void OnInit(Game game, GameElement parent)
    Parameters
    Type Name Description
    Game game
    GameElement parent
    Overrides
    IGameBehavior.OnInit(Game, GameElement)
    Exceptions
    Type Condition
    InvalidOperationException

    Thrown when the parent element is not of type Element3D.

    OnRender(Game, GameElement)

    Renderer callback

    Declaration
    public override void OnRender(Game game, GameElement parent)
    Parameters
    Type Name Description
    Game game
    GameElement parent
    Overrides
    IGameBehavior.OnRender(Game, GameElement)

    OnUpdate(Game, GameElement)

    Update callback.

    Declaration
    public override void OnUpdate(Game game, GameElement parent)
    Parameters
    Type Name Description
    Game game
    GameElement parent
    Overrides
    IGameBehavior.OnUpdate(Game, GameElement)

    UpdateRigidBody()

    Updates the RigidBody's position and scaling based on the associated parent element.

    Declaration
    public void UpdateRigidBody()
    In this article
    Back to top Generated by DocFX