Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Static Public Member Functions | Static Public Attributes | List of all members
CraftThumbnail Class Reference

Static Public Member Functions

static string GetPartIconTexturePath (Part part, out int variantIdx)
 Returns the Texture path and also outs the variantIdx More...
 
static IThumbnailSetup GetThumbNailSetupIface (AvailablePart availablePart)
 
static Texture2D TakePartSnaphot (string partName, StoredPart sPart, int resolution, string folderPath, out string fullFileName, float elevation=15f, float azimuth=25f, float pitch=15f, float hdg=25f, float fovFactor=1f, int variantIndex=-1)
 Create the Thumbnail image of a part in the specified folder More...
 
static Texture2D TakePartSnapshot (string partName, StoredPart sPart, Part part, int resolution, string folderPath, out string fullFileName, float elevation=15f, float azimuth=25f, float pitch=15f, float hdg=25f, float fovFactor=1f, int variantIndex=-1)
 Create the Thumbnail image of a part in the specified folder More...
 
static void TakeSnaphot (ShipConstruct ship, int resolution, string folderPath, string craftName, float elevation=45f, float azimuth=45f, float pitch=45f, float hdg=45f, float fovFactor=1f)
 /// Create the Thumbnail image of a craft in the specified folder More...
 

Static Public Attributes

static EventData
< ShipConstruct, string, byte[]> 
OnSnapshotCapture = new EventData<ShipConstruct, string, byte[]>("OnSnapshotCapture")
 

Member Function Documentation

static string CraftThumbnail.GetPartIconTexturePath ( Part  part,
out int  variantIdx 
)
inlinestatic

Returns the Texture path and also outs the variantIdx

Parameters
part
variantIdx
Returns
static IThumbnailSetup CraftThumbnail.GetThumbNailSetupIface ( AvailablePart  availablePart)
inlinestatic
static Texture2D CraftThumbnail.TakePartSnaphot ( string  partName,
StoredPart  sPart,
int  resolution,
string  folderPath,
out string  fullFileName,
float  elevation = 15f,
float  azimuth = 25f,
float  pitch = 15f,
float  hdg = 25f,
float  fovFactor = 1f,
int  variantIndex = -1 
)
inlinestatic

Create the Thumbnail image of a part in the specified folder

Parameters
partNameThe name of the part to snap
sPartThe Stored part if coming from a PAW this one will be available
resolutionSize of the thumbnail width and height
folderPathThe path from the app root to store the thumnb
elevationAngle of elevation for camera position
azimuthAngle of Azimuth for camera position
pitchAngle of pitch for camera rotation
hdgHeading in degrees for camera rotation
fovFactorFoV factor to change how far from teh craft the camera is
static Texture2D CraftThumbnail.TakePartSnapshot ( string  partName,
StoredPart  sPart,
Part  part,
int  resolution,
string  folderPath,
out string  fullFileName,
float  elevation = 15f,
float  azimuth = 25f,
float  pitch = 15f,
float  hdg = 25f,
float  fovFactor = 1f,
int  variantIndex = -1 
)
inlinestatic

Create the Thumbnail image of a part in the specified folder

Parameters
partNameThe name of the part to snap
sPartThe Stored part if coming from a PAW this one will be available
partIf Stored part is not available and Part is, like in Editor Logic a part pulled from the toolbox
resolutionSize of the thumbnail width and height
folderPathThe path from the app root to store the thumnb
elevationAngle of elevation for camera position
azimuthAngle of Azimuth for camera position
pitchAngle of pitch for camera rotation
hdgHeading in degrees for camera rotation
fovFactorFoV factor to change how far from teh craft the camera is
static void CraftThumbnail.TakeSnaphot ( ShipConstruct  ship,
int  resolution,
string  folderPath,
string  craftName,
float  elevation = 45f,
float  azimuth = 45f,
float  pitch = 45f,
float  hdg = 45f,
float  fovFactor = 1f 
)
inlinestatic

/// Create the Thumbnail image of a craft in the specified folder

Parameters
shipThe ship to snap
resolutionSize of the thumbnail width and height
folderPathThe path from the app root to store the thumnb
craftNameName of the file
elevationAngle of elevation for camera position
azimuthAngle of Azimuth for camera position
pitchAngle of pitch for camera rotation
hdgHeading in degrees for camera rotation
fovFactorFoV factor to change how far from teh craft the camera is

Member Data Documentation

EventData<ShipConstruct, string, byte[]> CraftThumbnail.OnSnapshotCapture = new EventData<ShipConstruct, string, byte[]>("OnSnapshotCapture")
static

The documentation for this class was generated from the following file: