Crosshair helper functions.  
More...
Crosshair helper functions. 
Helper functions for dealing with crosshairs in games. If you don't want to deal with handling accurate crosshairs in a variety of view modes (1st-person, 3rd-person, XR) then simply use one of the supplied functions. 
 | 
| vector  | Cross_GetPos (vector sizeXY) | 
|   | Returns the end-coordinates for a crosshair of a given size.  
  | 
|   | 
| void  | Cross_Draw (string materialPath, vector sizeXY) | 
|   | Draws a crosshair on the screen with the desired material and size.  
  | 
|   | 
| void  | Cross_DrawRGB (string materialPath, vector sizeXY, vector colorRGB) | 
|   | Draw a given crosshair on the screen, with variable color.  
  | 
|   | 
| void  | Cross_DrawRGBA (string materialPath, vector sizeXY, vector colorRGB, float alphaValue) | 
|   | Draw a given crosshair on the screen, with variable color and alpha.  
  | 
|   | 
| void  | Cross_DrawSub (string materialPath, vector sizeXY, vector sourcePosXY, vector sourceSizeXY) | 
|   | Draw a given crosshair on the screen, of only a section from a material.  
  | 
|   | 
| void  | Cross_DrawSubRGB (string materialPath, vector sizeXY, vector sourcePosXY, vector sourceSizeXY, vector colorRGB) | 
|   | Draw a given crosshair on the screen, of only a section from a material, with variable color.  
  | 
|   | 
| void  | Cross_DrawSubRGBA (string materialPath, vector sizeXY, vector sourcePosXY, vector sourceSizeXY, vector colorRGB, float alphaValue) | 
|   | Draw a given crosshair on the screen, of only a section from a material, with variable color/alpha.  
  | 
|   | 
◆ Cross_Draw()
      
        
          | void Cross_Draw  | 
          ( | 
          string |           materialPath,  | 
        
        
           | 
           | 
          vector |           sizeXY ) | 
        
      
 
Draws a crosshair on the screen with the desired material and size. 
- Parameters
 - 
  
    | materialPath | is the material to use.  | 
    | sizeXY | is the size in pixels it is meant to take up on screen.  | 
  
   
 
 
◆ Cross_DrawRGB()
      
        
          | void Cross_DrawRGB  | 
          ( | 
          string |           materialPath,  | 
        
        
           | 
           | 
          vector |           sizeXY,  | 
        
        
           | 
           | 
          vector |           colorRGB ) | 
        
      
 
Draw a given crosshair on the screen, with variable color. 
- Parameters
 - 
  
    | materialPath | is the material to use.  | 
    | sizeXY | is the size in pixels it is meant to take up on screen.  | 
    | colorRGB | is the normalized color values to tint the surface with.  | 
  
   
 
 
◆ Cross_DrawRGBA()
      
        
          | void Cross_DrawRGBA  | 
          ( | 
          string |           materialPath,  | 
        
        
           | 
           | 
          vector |           sizeXY,  | 
        
        
           | 
           | 
          vector |           colorRGB,  | 
        
        
           | 
           | 
          float |           alphaValue ) | 
        
      
 
Draw a given crosshair on the screen, with variable color and alpha. 
- Parameters
 - 
  
    | materialPath | is the material to use.  | 
    | sizeXY | is the size in pixels it is meant to take up on screen.  | 
    | colorRGB | is the normalized color values to tint the surface with.  | 
    | alphaValue | is the alpha values to use on the whole surface.  | 
  
   
 
 
◆ Cross_DrawSub()
      
        
          | void Cross_DrawSub  | 
          ( | 
          string |           materialPath,  | 
        
        
           | 
           | 
          vector |           sizeXY,  | 
        
        
           | 
           | 
          vector |           sourcePosXY,  | 
        
        
           | 
           | 
          vector |           sourceSizeXY ) | 
        
      
 
Draw a given crosshair on the screen, of only a section from a material. 
- Parameters
 - 
  
    | materialPath | is the material to use.  | 
    | sizeXY | is the size in pixels it is meant to take up on screen.  | 
    | sourcePosXY | is a normalized starting position within the material from which we should start drawing from.  | 
    | sourceSizeXY | is the normalized size within the material from which we should draw from.  | 
  
   
 
 
◆ Cross_DrawSubRGB()
      
        
          | void Cross_DrawSubRGB  | 
          ( | 
          string |           materialPath,  | 
        
        
           | 
           | 
          vector |           sizeXY,  | 
        
        
           | 
           | 
          vector |           sourcePosXY,  | 
        
        
           | 
           | 
          vector |           sourceSizeXY,  | 
        
        
           | 
           | 
          vector |           colorRGB ) | 
        
      
 
Draw a given crosshair on the screen, of only a section from a material, with variable color. 
- Parameters
 - 
  
    | materialPath | is the material to use.  | 
    | sizeXY | is the size in pixels it is meant to take up on screen.  | 
    | sourcePosXY | is a normalized starting position within the material from which we should start drawing from.  | 
    | sourceSizeXY | is the normalized size within the material from which we should draw from.  | 
    | colorRGB | is the normalized color values to tint the surface with.  | 
  
   
 
 
◆ Cross_DrawSubRGBA()
      
        
          | void Cross_DrawSubRGBA  | 
          ( | 
          string |           materialPath,  | 
        
        
           | 
           | 
          vector |           sizeXY,  | 
        
        
           | 
           | 
          vector |           sourcePosXY,  | 
        
        
           | 
           | 
          vector |           sourceSizeXY,  | 
        
        
           | 
           | 
          vector |           colorRGB,  | 
        
        
           | 
           | 
          float |           alphaValue ) | 
        
      
 
Draw a given crosshair on the screen, of only a section from a material, with variable color/alpha. 
- Parameters
 - 
  
    | materialPath | is the material to use.  | 
    | sizeXY | is the size in pixels it is meant to take up on screen.  | 
    | sourcePosXY | is a normalized starting position within the material from which we should start drawing from.  | 
    | sourceSizeXY | is the normalized size within the material from which we should draw from.  | 
    | colorRGB | is the normalized color values to tint the surface with.  | 
    | alphaValue | is the alpha values to use on the whole surface.  | 
  
   
 
 
◆ Cross_GetPos()
      
        
          | vector Cross_GetPos  | 
          ( | 
          vector |           sizeXY | ) | 
           | 
        
      
 
Returns the end-coordinates for a crosshair of a given size. 
- Parameters
 - 
  
    | sizeXY | is the size in pixels it is meant to take up on screen.  |