Ejemplo n.º 1
0
                public bool MoveNext()
                {
                    var count = VectorSharedPtr_Count(handle);

                    if (count < 1 || count <= index)
                    {
                        return(false);
                    }

                    current = Runtime.LookupRefCounted <U>(VectorSharedPtr_GetIdx(handle, index));
                    index++;
                    return(true);
                }
Ejemplo n.º 2
0
 /// <summary>
 /// Return render surface.
 /// </summary>
 private RenderSurface GetRenderSurface()
 {
     Runtime.ValidateRefCounted(this);
     return(Runtime.LookupRefCounted <RenderSurface> (Texture2DArray_GetRenderSurface(handle)));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Return animation state by index.
 /// </summary>
 public AnimationState GetAnimationState(uint index)
 {
     Runtime.ValidateRefCounted(this);
     return(Runtime.LookupRefCounted <AnimationState> (AnimatedModel_GetAnimationState8(handle, index)));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Return animation state by animation name.
 /// </summary>
 public AnimationState GetAnimationState(string animationName)
 {
     Runtime.ValidateRefCounted(this);
     return(Runtime.LookupRefCounted <AnimationState> (AnimatedModel_GetAnimationState6(handle, animationName)));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Create an object by type hash. Return pointer to it or null if no factory found.
 /// </summary>
 public UrhoObject CreateObject(StringHash objectType)
 {
     Runtime.ValidateRefCounted(this);
     return(Runtime.LookupRefCounted <UrhoObject> (Context_CreateObject(handle, objectType.Code)));
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Clone the material.
 /// </summary>
 public Material Clone(string cloneName)
 {
     Runtime.ValidateRefCounted(this);
     return(Runtime.LookupRefCounted <Material> (Material_Clone(handle, cloneName)));
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Return subsystem by type.
 /// </summary>
 public Urho.UrhoObject GetSubsystem(StringHash type)
 {
     Runtime.ValidateRefCounted(this);
     return(Runtime.LookupRefCounted <Urho.UrhoObject> (Context_GetSubsystem(handle, type.Code)));
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Clone the model. The geometry data is deep-copied and can be modified in the clone without affecting the original.
 /// </summary>
 public Model Clone(string cloneName = "")
 {
     Runtime.ValidateRefCounted(this);
     return(Runtime.LookupRefCounted <Model> (Model_Clone(handle, cloneName)));
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Return target object.
 /// </summary>
 private Urho.UrhoObject GetTarget()
 {
     Runtime.ValidateRefCounted(this);
     return(Runtime.LookupRefCounted <Urho.UrhoObject> (ValueAnimationInfo_GetTarget(handle)));
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Return a supported pass by name. This overload should not be called in time-critical rendering loops; use a pre-acquired pass index instead.
 /// </summary>
 public Pass GetSupportedPass(string passName)
 {
     Runtime.ValidateRefCounted(this);
     return(Runtime.LookupRefCounted <Pass> (Technique_GetSupportedPass2(handle, passName)));
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Return a clone with added shader compilation defines. Called internally by Material.
 /// </summary>
 public Technique CloneWithDefines(string vsDefines, string psDefines)
 {
     Runtime.ValidateRefCounted(this);
     return(Runtime.LookupRefCounted <Technique> (Technique_CloneWithDefines(handle, vsDefines, psDefines)));
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Return a pass that is supported for rendering, or null if not found.
 /// </summary>
 public Pass GetSupportedPass(uint passIndex)
 {
     Runtime.ValidateRefCounted(this);
     return(Runtime.LookupRefCounted <Pass> (Technique_GetSupportedPass(handle, passIndex)));
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Clone the technique. Passes will be deep copied to allow independent modification.
 /// </summary>
 public Technique Clone(string cloneName)
 {
     Runtime.ValidateRefCounted(this);
     return(Runtime.LookupRefCounted <Technique> (Technique_Clone(handle, cloneName)));
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Create a new pass.
 /// </summary>
 public Pass CreatePass(string passName)
 {
     Runtime.ValidateRefCounted(this);
     return(Runtime.LookupRefCounted <Pass> (Technique_CreatePass(handle, passName)));
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Clone the animation.
 /// </summary>
 public Animation Clone(string cloneName = "")
 {
     Runtime.ValidateRefCounted(this);
     return(Runtime.LookupRefCounted <Animation> (Animation_Clone(handle, cloneName)));
 }
Ejemplo n.º 16
0
 /// <summary>
 /// Return rendering path.
 /// </summary>
 private RenderPath GetRenderPath()
 {
     Runtime.ValidateRefCounted(this);
     return(Runtime.LookupRefCounted <RenderPath> (Viewport_GetRenderPath(handle)));
 }
Ejemplo n.º 17
0
 /// <summary>
 /// Return attribute animation info by name.
 /// </summary>
 public ValueAnimationInfo GetAttributeAnimationInfo(string name)
 {
     Runtime.ValidateRefCounted(this);
     return(Runtime.LookupRefCounted <ValueAnimationInfo> (ObjectAnimation_GetAttributeAnimationInfo(handle, name)));
 }
Ejemplo n.º 18
0
 public T GetRefCounted <T>() where T : RefCounted => Runtime.LookupRefCounted <T>(ptr);
Ejemplo n.º 19
0
 /// <summary>
 /// Return pass by technique index and pass name.
 /// </summary>
 public Pass GetPass(uint index, string passName)
 {
     Runtime.ValidateRefCounted(this);
     return(Runtime.LookupRefCounted <Pass> (Material_GetPass(handle, index, passName)));
 }
Ejemplo n.º 20
0
 /// <summary>
 /// Return execution context.
 /// </summary>
 private Context GetContext()
 {
     return(Runtime.LookupRefCounted <Context> (UrhoObject_GetContext(handle)));
 }
Ejemplo n.º 21
0
 /// <summary>
 /// Return active event sender. Null outside event handling.
 /// </summary>
 private Urho.UrhoObject GetEventSender()
 {
     Runtime.ValidateRefCounted(this);
     return(Runtime.LookupRefCounted <Urho.UrhoObject> (Context_GetEventSender(handle)));
 }
Ejemplo n.º 22
0
 /// <summary>
 /// Return event receivers for a sender and event type, or null if they do not exist.
 /// </summary>
 public EventReceiverGroup GetEventReceivers(Urho.UrhoObject sender, StringHash eventType)
 {
     Runtime.ValidateRefCounted(this);
     return(Runtime.LookupRefCounted <EventReceiverGroup> (Context_GetEventReceivers(handle, (object)sender == null ? IntPtr.Zero : sender.Handle, eventType.Code)));
 }
Ejemplo n.º 23
0
 public virtual T this [int idx] => Runtime.LookupRefCounted <T> (VectorSharedPtr_GetIdx(handle, idx));
Ejemplo n.º 24
0
 /// <summary>
 /// Return event receivers for an event type, or null if they do not exist.
 /// </summary>
 public EventReceiverGroup GetEventReceivers(StringHash eventType)
 {
     Runtime.ValidateRefCounted(this);
     return(Runtime.LookupRefCounted <EventReceiverGroup> (Context_GetEventReceivers0(handle, eventType.Code)));
 }
Ejemplo n.º 25
0
 /// <summary>
 /// Return animation state by animation pointer.
 /// </summary>
 public AnimationState GetAnimationState(Animation animation)
 {
     Runtime.ValidateRefCounted(this);
     return(Runtime.LookupRefCounted <AnimationState> (AnimatedModel_GetAnimationState(handle, (object)animation == null ? IntPtr.Zero : animation.Handle)));
 }
Ejemplo n.º 26
0
 /// <summary>
 /// Get image data from a face's zero mip level. Only RGB and RGBA textures are supported.
 /// </summary>
 public Image GetImage(CubeMapFace face)
 {
     Runtime.ValidateRefCounted(this);
     return(Runtime.LookupRefCounted <Image> (TextureCube_GetImage(handle, face)));
 }
Ejemplo n.º 27
0
 /// <summary>
 /// Return animation state by animation name hash.
 /// </summary>
 public AnimationState GetAnimationState(StringHash animationNameHash)
 {
     Runtime.ValidateRefCounted(this);
     return(Runtime.LookupRefCounted <AnimationState> (AnimatedModel_GetAnimationState7(handle, animationNameHash.Code)));
 }
Ejemplo n.º 28
0
 /// <summary>
 /// Return render surface for one face.
 /// </summary>
 public RenderSurface GetRenderSurface(CubeMapFace face)
 {
     Runtime.ValidateRefCounted(this);
     return(Runtime.LookupRefCounted <RenderSurface> (TextureCube_GetRenderSurface(handle, face)));
 }
Ejemplo n.º 29
0
 /// <summary>
 /// Clone the rendering path.
 /// </summary>
 public RenderPath Clone()
 {
     Runtime.ValidateRefCounted(this);
     return(Runtime.LookupRefCounted <RenderPath> (RenderPath_Clone(handle)));
 }
Ejemplo n.º 30
0
 /// <summary>
 /// Return a pass by name, or null if not found. This overload should not be called in time-critical rendering loops; use a pre-acquired pass index instead.
 /// </summary>
 public Pass GetPass(string name)
 {
     Runtime.ValidateRefCounted(this);
     return(Runtime.LookupRefCounted <Pass> (Technique_GetPass1(handle, name)));
 }