UE5 360 Stereo Panoramic Player 1.2.5
Create interactive Media Players and Virtual Tours for mono and stereo 360 panoramic images and videos in Unreal Engine 5.
|
PanoramicSphere is the main class to view a panoramic source (both UTexture2D and MediaTexture). More...
#include <PanoramicSphere.h>
Public Member Functions | |
void | AttachWidget (class UWidgetComponent *Widget, const FPanoramicPosition &Pos, float Scale=0.1f) |
Attach the given widget component to the panoramic sphere as its child. More... | |
virtual void | BeginPlay () override |
Override AActor::BeginPlay. More... | |
float | DistanceFromWidgets () const |
Returns the distance from the sphere to where all widgets are placed regarding their centers. More... | |
void | End () |
Exits from panoramic mode. More... | |
virtual void | EndPlay (const EEndPlayReason::Type EndPlayReason) override |
Override AActor::EndPlay. More... | |
virtual void | OnConstruction (const FTransform &Transform) override |
Override AActor::OnConstruction. More... | |
void | Play (UTexture *Media, EPanoramicMediaLayout MediaLayout) |
Enters into panoramic mode playing the given UTexture. More... | |
void | SetBackgroundTexture (UTexture *Background) |
Sets the background texture. More... | |
void | SetCutOffAlpha (float CutOffAlpha) |
Sets the cutoff alpha. More... | |
void | SetCutOffIntensity (float Intensity) |
Sets the cutoff intensity. More... | |
void | SetCutOffTexture (UTexture *CutOffTexture) |
Sets the cutoff texture. More... | |
void | SetFadeIntensity (float Intensity) |
Sets the fade intensity. More... | |
virtual void | Tick (float DeltaSeconds) override |
Override AActor::Tick. More... | |
FVector2D | UVMap (FVector WorldDir) const |
Map the input unit vector (in world space) to its UV coordinates. More... | |
Public Attributes | |
bool | AutoStart |
When true it plays the specified PanoramicTexture automatically. More... | |
ESphereBlendMode | BlendMode |
The blend mode. More... | |
EPanoramicMediaLayout | MediaLayout |
The media layout. More... | |
UTexture * | PanoramicTexture |
The Texture to display. More... | |
FSphereConfig | SphereConfiguration |
Defines how the sphere should be generated. More... | |
PanoramicSphere is the main class to view a panoramic source (both UTexture2D and MediaTexture).
The source is rendered through a procedural generated sphere mesh. It can be configured through FSphereConfig
void APanoramicSphere::AttachWidget | ( | class UWidgetComponent * | Widget, |
const FPanoramicPosition & | Pos, | ||
float | Scale = 0.1f |
||
) |
Attach the given widget component to the panoramic sphere as its child.
Widget | the widget to be attached. |
Pos | where to place the widget |
Scale | scale factor to zoom in/out the widget. |
|
overridevirtual |
Override AActor::BeginPlay.
float APanoramicSphere::DistanceFromWidgets | ( | ) | const |
Returns the distance from the sphere to where all widgets are placed regarding their centers.
void APanoramicSphere::End | ( | ) |
Exits from panoramic mode.
|
overridevirtual |
Override AActor::EndPlay.
|
overridevirtual |
Override AActor::OnConstruction.
void APanoramicSphere::Play | ( | UTexture * | Media, |
EPanoramicMediaLayout | MediaLayout | ||
) |
Enters into panoramic mode playing the given UTexture.
Media | the media to play |
MediaLayout | the media layout ( |
void APanoramicSphere::SetBackgroundTexture | ( | UTexture * | Background | ) |
Sets the background texture.
This texture is used to crossfade during the fade in/out.
void APanoramicSphere::SetCutOffAlpha | ( | float | CutOffAlpha | ) |
Sets the cutoff alpha.
The value must be in [0,1].
void APanoramicSphere::SetCutOffIntensity | ( | float | Intensity | ) |
Sets the cutoff intensity.
The value must be in [0,1].
void APanoramicSphere::SetCutOffTexture | ( | UTexture * | CutOffTexture | ) |
Sets the cutoff texture.
When the cutoff is enabled, the texture texels are compared with the cutoff intensity. When the texel is below the cutoff threshold, it will be discarded (not rendered).
void APanoramicSphere::SetFadeIntensity | ( | float | Intensity | ) |
Sets the fade intensity.
The value must be in [0,1].
|
overridevirtual |
Override AActor::Tick.
FVector2D APanoramicSphere::UVMap | ( | FVector | WorldDir | ) | const |
Map the input unit vector (in world space) to its UV coordinates.
bool APanoramicSphere::AutoStart |
When true it plays the specified PanoramicTexture automatically.
ESphereBlendMode APanoramicSphere::BlendMode |
The blend mode.
EPanoramicMediaLayout APanoramicSphere::MediaLayout |
The media layout.
UTexture* APanoramicSphere::PanoramicTexture |
The Texture to display.
Can be a Utexture2D or even a UMediaTexture but in this case you have to handle the playback by hand externally.
FSphereConfig APanoramicSphere::SphereConfiguration |
Defines how the sphere should be generated.