本文整理汇总了C#中Source.Type方法的典型用法代码示例。如果您正苦于以下问题:C# Source.Type方法的具体用法?C# Source.Type怎么用?C# Source.Type使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Source
的用法示例。
在下文中一共展示了Source.Type方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Direct_Sound
/// <summary>
/// Direct sound constructor. This prepares the simulation to run.
/// </summary>
/// <param name="Src_in">The sound source</param>
/// <param name="Rec_in">The collection of receivers</param>
/// <param name="Room_in">The acoustical scene to render</param>
/// <param name="RayCount">The number of rays which will be used </param>
public Direct_Sound(Source Src_in, Receiver_Bank Rec_in, Scene Room_in, int[] Octaves)
{
type = Src_in.Type();
Validity = new bool[Rec_in.Count];//[Rec_in.Count];
Io = new double[Rec_in.Count][][];//[Rec_in.Count][t,8];
Time_Pt = new double[Rec_in.Count];//[Rec_in.Count];
Dir_Rec_Pos = new float[Rec_in.Count][][][];
Dir_Rec_Neg = new float[Rec_in.Count][][][];
Room = Room_in;
C_Sound = Room_in.Sound_speed(0);
SampleFreq = Rec_in.SampleRate;
Src = Src_in;
this.CO_Time = Rec_in.CO_Time;
Receiver = new List<Point>();
Rho_C = new double[Rec_in.Count];
for(int i = 0; i < Rec_in.Count; i++)
{
Rho_C[i] = Room.Rho_C(Rec_in.H_Origin(i));
Receiver.Add(Rec_in.H_Origin(i));
}
SWL = new double[8] { Src_in.SWL(0), Src_in.SWL(1), Src_in.SWL(2), Src_in.SWL(3), Src_in.SWL(4), Src_in.SWL(5), Src_in.SWL(6), Src_in.SWL(7) };
Delay_ms = Src.Delay;
Oct_choice = Octaves;
}
示例2: Fill_in
private void Fill_in(Source Src_Pt, int SampleRate_in, double Increment_in, Scene Sc, int RCT, double Cutoff_time, bool Time_1Pt, bool Z_displacementIn, bool DirectionalIn, bool RecOnVertex, bool Offset_Mesh)
{
_Sc = Sc;
Src = Src_Pt.Origin();
SrcType = Src_Pt.Type();
CutOffTime = Cutoff_time;
SampleRate = SampleRate_in;
increment = Increment_in;
Rec_Vertex = RecOnVertex;
Mesh_Offset = Offset_Mesh;
Z_Displacement = Z_displacementIn;
Directional = DirectionalIn;
Time1Pt = Time_1Pt;
SampleCT = Time1Pt ? 1 : (int)Math.Floor(CutOffTime * SampleRate / 1000);
Max = new Hare.Geometry.Point(Double.NegativeInfinity, Double.NegativeInfinity, Double.NegativeInfinity);
Min = new Hare.Geometry.Point(Double.PositiveInfinity, Double.PositiveInfinity, Double.PositiveInfinity);
Rec_List = Rec_Vertex ? new Map_Receiver[Map_Mesh.Vertices.Count] : new Map_Receiver[Map_Mesh.Faces.Count];
lock (Map_Mesh)
{
bool FN = Map_Mesh.FaceNormals.ComputeFaceNormals();
}
}